You can subscribe to this list here.
| 2005 |
Jan
(70) |
Feb
(200) |
Mar
(222) |
Apr
(198) |
May
(122) |
Jun
(74) |
Jul
(171) |
Aug
(235) |
Sep
(118) |
Oct
(165) |
Nov
(276) |
Dec
(167) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(102) |
Feb
(124) |
Mar
(90) |
Apr
(155) |
May
(162) |
Jun
(285) |
Jul
(142) |
Aug
(136) |
Sep
(251) |
Oct
(188) |
Nov
(156) |
Dec
(144) |
| 2007 |
Jan
(231) |
Feb
(151) |
Mar
(142) |
Apr
(69) |
May
(66) |
Jun
(88) |
Jul
(61) |
Aug
(82) |
Sep
(125) |
Oct
(167) |
Nov
(115) |
Dec
(70) |
| 2008 |
Jan
(112) |
Feb
(109) |
Mar
(163) |
Apr
(239) |
May
(185) |
Jun
(147) |
Jul
(123) |
Aug
(142) |
Sep
(134) |
Oct
(106) |
Nov
(151) |
Dec
(114) |
| 2009 |
Jan
(143) |
Feb
(188) |
Mar
(121) |
Apr
(188) |
May
(193) |
Jun
(113) |
Jul
(161) |
Aug
(172) |
Sep
(95) |
Oct
(157) |
Nov
(123) |
Dec
(112) |
| 2010 |
Jan
(61) |
Feb
(115) |
Mar
(163) |
Apr
(138) |
May
(152) |
Jun
(133) |
Jul
(228) |
Aug
(135) |
Sep
(230) |
Oct
(214) |
Nov
(178) |
Dec
(225) |
| 2011 |
Jan
(197) |
Feb
(284) |
Mar
(244) |
Apr
(190) |
May
(119) |
Jun
(195) |
Jul
(305) |
Aug
(204) |
Sep
(175) |
Oct
(196) |
Nov
(166) |
Dec
(170) |
| 2012 |
Jan
(203) |
Feb
(197) |
Mar
(255) |
Apr
(153) |
May
(111) |
Jun
(130) |
Jul
(82) |
Aug
(207) |
Sep
(103) |
Oct
(173) |
Nov
(150) |
Dec
(171) |
| 2013 |
Jan
(156) |
Feb
(242) |
Mar
(216) |
Apr
(264) |
May
(116) |
Jun
(218) |
Jul
(192) |
Aug
(255) |
Sep
(157) |
Oct
(209) |
Nov
(227) |
Dec
(222) |
| 2014 |
Jan
(207) |
Feb
(214) |
Mar
(223) |
Apr
(125) |
May
(183) |
Jun
(213) |
Jul
(219) |
Aug
(230) |
Sep
(195) |
Oct
(275) |
Nov
(179) |
Dec
(163) |
| 2015 |
Jan
(227) |
Feb
(148) |
Mar
(148) |
Apr
(178) |
May
(228) |
Jun
(195) |
Jul
(155) |
Aug
(168) |
Sep
(168) |
Oct
(151) |
Nov
(259) |
Dec
(137) |
| 2016 |
Jan
(127) |
Feb
(244) |
Mar
(219) |
Apr
(266) |
May
(120) |
Jun
(366) |
Jul
(211) |
Aug
(203) |
Sep
(222) |
Oct
(155) |
Nov
(97) |
Dec
|
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-24 23:33:47
|
Update of /cvsroot/cctbx/cctbx/cctbx/regression In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32507/cctbx/regression Modified Files: tst_coordination_sequences.py tst_pair_asu_table.py Log Message: major setpaths overhaul Index: tst_coordination_sequences.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/regression/tst_coordination_sequences.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tst_coordination_sequences.py 20 Feb 2005 04:10:44 -0000 1.11 --- tst_coordination_sequences.py 24 Feb 2005 23:33:36 -0000 1.12 *************** *** 72,77 **** dest="verbose") ).process(args=args) ! atlas_file = libtbx.env.under_dist_root( ! "regression/misc/strudat_zeolite_atlas") if (not os.path.isfile(atlas_file)): print "Skipping exercise(): input file not available" --- 72,77 ---- dest="verbose") ).process(args=args) ! atlas_file = libtbx.env.under_dist( ! "libtbx", "../regression/misc/strudat_zeolite_atlas") if (not os.path.isfile(atlas_file)): print "Skipping exercise(): input file not available" Index: tst_pair_asu_table.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/regression/tst_pair_asu_table.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tst_pair_asu_table.py 20 Feb 2005 04:10:44 -0000 1.7 --- tst_pair_asu_table.py 24 Feb 2005 23:33:36 -0000 1.8 *************** *** 201,205 **** exercise_icosahedron(verbose=verbose) default_distance_cutoff=3.5 ! regression_misc = libtbx.env.under_dist_root("regression/misc") file_names = [] for file_name in ["strudat_zeolite_atlas", "strudat_special_bonds"]: --- 201,205 ---- exercise_icosahedron(verbose=verbose) default_distance_cutoff=3.5 ! regression_misc = libtbx.env.under_dist("libtbx", "../regression/misc") file_names = [] for file_name in ["strudat_zeolite_atlas", "strudat_special_bonds"]: |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-24 23:29:43
|
Update of /cvsroot/cctbx/libtbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31520 Added Files: windows_dispatcher.exe Log Message: Initial version. --- NEW FILE: windows_dispatcher.exe --- (This appears to be a binary file; contents omitted.) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-24 23:28:45
|
Update of /cvsroot/cctbx/libtbx/libtbx/bundle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31275/libtbx/bundle Modified Files: copy_build_libtbx.py copy_runtime_sources.py install_bat.py install_csh.py Log Message: major setpaths overhaul Index: copy_runtime_sources.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/bundle/copy_runtime_sources.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** copy_runtime_sources.py 18 Nov 2004 10:18:40 -0000 1.9 --- copy_runtime_sources.py 24 Feb 2005 23:28:20 -0000 1.10 *************** *** 39,43 **** target_root))) libtbx_env = libtbx.config.env() ! dist_root = libtbx_env.LIBTBX_DIST_ROOT for package in ["libtbx"] + libtbx_env.package_list: for package_suf in libtbx.config.package_pair( --- 39,43 ---- target_root))) libtbx_env = libtbx.config.env() ! dist_root = libtbx_env.under_dist("libtbx", "..") for package in ["libtbx"] + libtbx_env.package_list: for package_suf in libtbx.config.package_pair( Index: copy_build_libtbx.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/bundle/copy_build_libtbx.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** copy_build_libtbx.py 19 Feb 2005 01:50:13 -0000 1.4 --- copy_build_libtbx.py 24 Feb 2005 23:28:20 -0000 1.5 *************** *** 8,12 **** def __init__(self, libtbx_env): ! self.dispatcher_front_end_exe = libtbx_env.dispatcher_front_end_exe() def __call__(self, target_root_dir, dirname, names): --- 8,18 ---- def __init__(self, libtbx_env): ! windows_dispatcher = libtbx_env.windows_dispatcher(command_path=None) ! if (windows_dispatcher is None): ! self.windows_dispatcher_size = None ! else: ! self.windows_dispatcher_size = len(windows_dispatcher) ! self.windows_dispatcher_unique_pattern = \ ! libtbx_env.windows_dispatcher_unique_pattern def __call__(self, target_root_dir, dirname, names): *************** *** 34,41 **** def is_disposable_file(self, name, path): ! if ( self.dispatcher_front_end_exe is not None and name.endswith(".exe")): ! if (open(path, "rb").read(len(self.dispatcher_front_end_exe)+1) ! == self.dispatcher_front_end_exe): return True else: --- 40,49 ---- def is_disposable_file(self, name, path): ! if (self.windows_dispatcher_size is not None and name.endswith(".exe")): ! binary_string = open(path, "rb").read(self.windows_dispatcher_size+1) ! if (len(binary_string) > self.windows_dispatcher_size): ! return True ! if (binary_string.find(self.windows_dispatcher_unique_pattern) >= 0): return True else: Index: install_bat.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/bundle/install_bat.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** install_bat.py 20 Jun 2004 13:06:28 -0000 1.10 --- install_bat.py 24 Feb 2005 23:28:20 -0000 1.11 *************** *** 43,47 **** cd .. if not %%el%% == 0 goto end ! call %(bundle)s_build\setpaths.bat if not exist "%%SCITBX_DIST%%\lbfgs\boost_python\tst_lbfgs.py" goto skip_test --- 43,47 ---- cd .. if not %%el%% == 0 goto end ! call %(bundle)s_build\setpaths.bat all if not exist "%%SCITBX_DIST%%\lbfgs\boost_python\tst_lbfgs.py" goto skip_test Index: install_csh.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/bundle/install_csh.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** install_csh.py 22 Jan 2005 13:24:49 -0000 1.11 --- install_csh.py 24 Feb 2005 23:28:20 -0000 1.12 *************** *** 200,204 **** echo "Configuring $bundle build directory" "$python_exe" "$sources/libtbx/configure.py" --build="$build_mode" %(top_modules)s ! source setpaths.csh if ($have_sources != 0) then --- 200,204 ---- echo "Configuring $bundle build directory" "$python_exe" "$sources/libtbx/configure.py" --build="$build_mode" %(top_modules)s ! source setpaths.csh all if ($have_sources != 0) then |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-24 23:28:45
|
Update of /cvsroot/cctbx/libtbx/libtbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31275/libtbx Modified Files: config.py env.py path.py test_utils.py Log Message: major setpaths overhaul Index: test_utils.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/test_utils.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_utils.py 19 Jan 2005 12:17:45 -0000 1.4 --- test_utils.py 24 Feb 2005 23:28:19 -0000 1.5 *************** *** 4,8 **** def run_tests(build_dir, dist_dir, tst_list): import sys, os, os.path ! python_exe = sys.executable for tst in tst_list: cmd_args = "" --- 4,11 ---- def run_tests(build_dir, dist_dir, tst_list): import sys, os, os.path ! if (os.name == "nt"): ! python_exe = sys.executable ! else: ! python_exe = "libtbx.python" for tst in tst_list: cmd_args = "" *************** *** 22,31 **** assert tst_path.find("$") < 0 tst_path = os.path.normpath(tst_path) if (tst_path.endswith(".py")): ! cmd = python_exe + " " + tst_path else: ! cmd = tst_path ! if ("--valgrind" in sys.argv[1:]): ! cmd = os.environ["LIBTBX_VALGRIND"] + " " + cmd cmd += cmd_args print cmd --- 25,37 ---- assert tst_path.find("$") < 0 tst_path = os.path.normpath(tst_path) + cmd = "" if (tst_path.endswith(".py")): ! if ("--valgrind" in sys.argv[1:]): ! cmd = "libtbx.valgrind " ! cmd += python_exe + " " + tst_path else: ! if ("--valgrind" in sys.argv[1:]): ! cmd = os.environ["LIBTBX_VALGRIND"] + " " ! cmd += tst_path cmd += cmd_args print cmd Index: config.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/config.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** config.py 20 Feb 2005 04:09:53 -0000 1.26 --- config.py 24 Feb 2005 23:28:19 -0000 1.27 *************** *** 1,9 **** from libtbx.path import norm_join import sys, os, pickle from os.path import normpath, join, abspath, dirname, isdir, isfile norm = normpath - class UserError(Exception): pass - def full_path(command, search_first=[], search_last=[]): dirs = search_first + os.environ["PATH"].split(os.pathsep) + search_last --- 1,8 ---- from libtbx.path import norm_join + from libtbx.utils import UserError import sys, os, pickle from os.path import normpath, join, abspath, dirname, isdir, isfile norm = normpath def full_path(command, search_first=[], search_last=[]): dirs = search_first + os.environ["PATH"].split(os.pathsep) + search_last *************** *** 113,121 **** return result class env: ! def __init__(self, application_prefix="LIBTBX"): ! self.application_prefix = application_prefix ! libtbx_build = os.environ["LIBTBX_BUILD"] # XXX XXX XXX XXX XXX XXX XXX XXX file_name = join(libtbx_build, "libtbx_env") try: --- 112,129 ---- return result + def _windows_pathext(): + result = os.environ.get("PATHEXT", "").lower().split(os.pathsep) + for ext in [".py", ".exe", ".bat"]: + if (ext not in result): + result.insert(0, ext) + return result + + if (os.name == "nt"): + windows_pathext = _windows_pathext() + class env: ! def __init__(self): ! libtbx_build = os.environ["LIBTBX_BUILD"] file_name = join(libtbx_build, "libtbx_env") try: *************** *** 133,137 **** + " Version used to configure: %d.%d." % self.python_version_major_minor + " Version used now: %d.%d." % sys.version_info[:2]) ! self._dispatcher_front_end_exe = None def write_api_file(self): --- 141,147 ---- + " Version used to configure: %d.%d." % self.python_version_major_minor + " Version used now: %d.%d." % sys.version_info[:2]) ! self._dispatcher_precall_commands = None ! self.partially_customized_windows_dispatcher = None ! self.windows_dispatcher_unique_pattern = None def write_api_file(self): *************** *** 146,151 **** return self.dist_name(package_name) in self.dist_paths ! def dist_path(self, package_name): ! return self.dist_paths[self.dist_name(package_name)] def effective_root(self, package_name): --- 156,163 ---- return self.dist_name(package_name) in self.dist_paths ! def dist_path(self, package_name, default=KeyError): ! if (default is KeyError): ! return self.dist_paths[self.dist_name(package_name)] ! return self.dist_paths.get(self.dist_name(package_name), default) def effective_root(self, package_name): *************** *** 155,174 **** return norm(os.getcwd()) == self.LIBTBX_BUILD ! def dispatcher_front_end_exe(self, ! application_prefix_placeholder="3A7P0P0L4I8C3A5T5I6O3N490P0R7E6F8I6X4"): ! if ( os.name == "nt" ! and self._dispatcher_front_end_exe is None): ! self._dispatcher_front_end_exe = open(join( ! self.dist_path("libtbx"), "dispatcher_front_end.exe"), "rb").read() ! application_prefix_index = self._dispatcher_front_end_exe.find( ! application_prefix_placeholder) ! assert application_prefix_index >= 0 ! assert len(self.application_prefix) <= len(application_prefix_placeholder) ! self._dispatcher_front_end_exe \ ! = self._dispatcher_front_end_exe[:application_prefix_index] \ ! + self.application_prefix + "\0" \ ! + self._dispatcher_front_end_exe[ ! application_prefix_index+len(self.application_prefix)+1:] ! return self._dispatcher_front_end_exe class include_registry: --- 167,349 ---- return norm(os.getcwd()) == self.LIBTBX_BUILD ! def dispatcher_precall_commands(self): ! if (self._dispatcher_precall_commands is None): ! lines = [] ! if ( self.python_version_major_minor == (2,2) ! and sys.platform == "linux2" ! and os.path.isfile("/etc/redhat-release")): ! try: red_hat_linux_release = open("/etc/redhat-release").readline() ! except: pass ! else: ! if ( red_hat_linux_release.startswith("Red Hat Linux release") ! and red_hat_linux_release.split()[4] == "9"): ! lines.extend([ ! 'if [ ! -n "$LD_ASSUME_KERNEL" ]; then', ! ' LD_ASSUME_KERNEL=2.4.1', ! ' export LD_ASSUME_KERNEL', ! 'fi']) ! if (os.name == "posix" and self.compiler == "icc"): ! addl_lines = self.create_posix_icc_ld_preload() ! if (addl_lines is None): ! raise UserError("Cannot determine LD_PRELOAD for icc.") ! lines.extend(addl_lines) ! self._dispatcher_precall_commands = lines ! return self._dispatcher_precall_commands ! ! def create_posix_icc_ld_preload(self): ! path_icc = full_path("icc") ! if (path_icc is None): return None ! path_lib = os.sep.join(path_icc.split(os.sep)[:-2] + ["lib"]) ! if (not isdir(path_lib)): return None ! ld_preload = [] ! path_libirc_a = join(path_lib, "libirc.a") ! path_libirc_so = join(path_lib, "libirc.so") ! if (isfile(path_libirc_so)): ! ld_preload.append(path_libirc_so) ! else: ! if (isfile(path_libirc_a)): ! path_libirc_so = join(self.LIBTBX_BUILD, "libtbx/libirc.so") ! if (not isfile(path_libirc_so)): ! cmd = "%s -shared -o %s %s" % ( ! path_icc, path_libirc_so, path_libirc_a) ! print cmd ! sys.stdout.flush() ! os.system(cmd) ! ld_preload.append(path_libirc_so) ! path_libunwind_so = None ! best_version = None ! for file_name in os.listdir(path_lib): ! if (file_name.startswith("libunwind.so.")): ! try: version = int(file_name.split(".")[2]) ! except: version = None ! if (version is not None): ! if (best_version is None or version > best_version): ! path_libunwind_so = join(path_lib, file_name) ! best_version = version ! if (path_libunwind_so is not None): ! ld_preload.append(path_libunwind_so) ! if (len(ld_preload) == 0): return None ! return [ ! 'LD_PRELOAD="%s"' % os.pathsep.join(ld_preload), ! 'export LD_PRELOAD'] ! ! def create_bin_sh_dispatcher(self, source_file, target_file): ! f = open(target_file, "w") ! print >> f, '#! /bin/sh' ! print >> f, '# LIBTBX_DISPATCHER DO NOT EDIT' ! print >> f, 'unset PYTHONHOME' ! print >> f, 'LIBTBX_BUILD="%s"' % self.LIBTBX_BUILD ! print >> f, 'export LIBTBX_BUILD' ! essentials = [("PYTHONPATH", self.PYTHONPATH)] ! if (sys.platform.startswith("darwin")): ! ld_library_path = "DYLD_LIBRARY_PATH" ! else: ! ld_library_path = "LD_LIBRARY_PATH" ! essentials.append((ld_library_path, self.LD_LIBRARY_PATH)) ! essentials.append(("PATH", self.PATH)) ! for n,v in essentials: ! v = ":".join(v) ! print >> f, 'if [ ! -n "$%s" ]; then' % n ! print >> f, ' %s="%s"' % (n, v) ! print >> f, 'else' ! print >> f, ' %s="%s:$%s"' % (n, v, n) ! print >> f, 'fi' ! print >> f, 'export %s' % n ! precall_commands = self.dispatcher_precall_commands() ! if (precall_commands is not None): ! for line in precall_commands: ! print >> f, line ! cmd = "" ! if (source_file.lower().endswith(".py")): ! cmd += " '"+self.LIBTBX_PYTHON_EXE+"'" ! cmd += " '"+source_file+"'" ! print >> f, 'if [ -n "$LIBTBX__VALGRIND_FLAG__" ]; then' ! print >> f, " exec $LIBTBX_VALGRIND"+cmd, '"$@"' ! print >> f, "elif [ $# -eq 0 ]; then" ! print >> f, " exec"+cmd ! print >> f, "else" ! print >> f, " exec"+cmd, '"$@"' ! print >> f, "fi" ! f.close() ! os.chmod(target_file, 0755) ! ! def windows_dispatcher(self, command_path, ! unique_pattern="0W6I0N6D0O2W8S5_0D0I8S1P4A3T6C4H9E4R7", ! libtbx_build="3L0I2B2T9B4X2_8B5U5I5L2D4", ! python_executable="5P2Y5T7H2O5N8_0E7X9E7C8U6T4A9B9L5E3", ! pythonpath="2P0Y1T7H3O2N7P7A2T5H8", ! main_path="1M5A1I0N4_8P7A0T9H9", ! target_command="5T4A3R7G8E3T7_6C5O0M0M3A8N8D2", ! dispatcher_exe_file_name="windows_dispatcher.exe"): ! if (os.name == "nt" ! and self.partially_customized_windows_dispatcher is None): ! self.partially_customized_windows_dispatcher = open(join( ! self.dist_path("libtbx"), dispatcher_exe_file_name), "rb").read() ! if (self.partially_customized_windows_dispatcher.find(unique_pattern)<0): ! raise RuntimeError('Unique pattern "%s" not found in file %s' % ( ! unique_pattern, dispatcher_exe_file_name)) ! self.windows_dispatcher_unique_pattern = unique_pattern ! for place_holder,actual_value in [ ! (libtbx_build, self.LIBTBX_BUILD), ! (python_executable, self.LIBTBX_PYTHON_EXE), ! (pythonpath, os.pathsep.join(self.PYTHONPATH)), ! (main_path, os.pathsep.join([ ! norm(join(self.LIBTBX_BUILD, "libtbx/bin")), ! norm(join(self.LIBTBX_BUILD, "libtbx"))]))]: ! self.partially_customized_windows_dispatcher = patch_windows_dispatcher( ! dispatcher_exe_file_name=dispatcher_exe_file_name, ! binary_string=self.partially_customized_windows_dispatcher, ! place_holder=place_holder, ! actual_value=actual_value) ! if (command_path is None): ! return self.partially_customized_windows_dispatcher ! return patch_windows_dispatcher( ! dispatcher_exe_file_name=dispatcher_exe_file_name, ! binary_string=self.partially_customized_windows_dispatcher, ! place_holder=target_command, ! actual_value=command_path) ! ! def create_win32_dispatcher(self, source_file, target_file): ! open(target_file+".exe", "wb").write( ! self.windows_dispatcher(command_path=source_file)) ! ! def create_dispatcher(self, source_file, target_file): ! if (os.name == "nt"): ! action = self.create_win32_dispatcher ! ext = ".exe" ! else: ! action = self.create_bin_sh_dispatcher ! ext = "" ! try: os.chmod(source_file, 0755) ! except OSError: pass ! target_file_ext = target_file + ext ! try: os.remove(target_file_ext) ! except OSError: ! try: os.remove(target_file_ext+".old") ! except OSError: pass ! try: os.rename(target_file_ext, target_file_ext+".old") ! except OSError: pass ! try: action(source_file, target_file) ! except IOError, e: print " Ignored:", e ! ! def create_dispatcher_in_bin(self, source_file, target_file): ! self.create_dispatcher( ! source_file=source_file, ! target_file=norm(join(self.LIBTBX_BUILD, "libtbx/bin", target_file))) ! ! def patch_windows_dispatcher( ! dispatcher_exe_file_name, ! binary_string, ! place_holder, ! actual_value): ! place_holder_start = binary_string.find(place_holder) ! if (place_holder_start < 0): ! raise RuntimeError('Place holder "%s" not found in file %s' % ( ! place_holder, dispatcher_exe_file_name)) ! place_holder_end = binary_string.find("\0", place_holder_start) ! assert len(actual_value) <= place_holder_end - place_holder_start ! return binary_string[:place_holder_start] \ ! + actual_value + "\0" \ ! + binary_string[place_holder_start+len(actual_value)+1:] class include_registry: Index: env.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/env.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** env.py 20 Feb 2005 04:09:53 -0000 1.1 --- env.py 24 Feb 2005 23:28:19 -0000 1.2 *************** *** 2,12 **** import os ! env_cache = libtbx.config.env() ! dist_root = env_cache.LIBTBX_DIST_ROOT ! dist_path = env_cache.dist_path ! build = env_cache.LIBTBX_BUILD ! ! def under_dist_root(path): ! return os.path.normpath(os.path.join(dist_root, path)) def under_dist(package_name, path): --- 2,8 ---- import os ! cache = libtbx.config.env() ! dist_path = cache.dist_path ! build_path = cache.LIBTBX_BUILD def under_dist(package_name, path): *************** *** 15,17 **** def under_build(path): ! return os.path.normpath(os.path.join(build, path)) --- 11,13 ---- def under_build(path): ! return os.path.normpath(os.path.join(build_path, path)) Index: path.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/path.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** path.py 5 Jan 2005 00:49:12 -0000 1.4 --- path.py 24 Feb 2005 23:28:19 -0000 1.5 *************** *** 9,38 **** os.makedirs(target_dir) - _shortpath_bat = None - - def abs_path_short(abs_path): - if (os.name != "nt"): return abs_path - global _shortpath_bat - if (_shortpath_bat is None): - _shortpath_bat = "shortpath.bat" - libtbx_build = os.environ.get("LIBTBX_BUILD", None) - if (libtbx_build is not None): - _shortpath_bat = os.path.join(libtbx_build, _shortpath_bat) - assert os.path.exists(_shortpath_bat) - return os.popen('call "%s" "%s"' % - (_shortpath_bat, abs_path), "r").readline().rstrip() - - def abs_path_clean(abs_path): - if (os.name != "nt"): return abs_path - short = abs_path_short(abs_path).split(os.sep) - orig = abs_path.split(os.sep) - clean = [] - for o,s in zip(orig, short): - if (o.find(" ") < 0): - clean.append(o) - else: - clean.append(s) - return os.sep.join(clean) - def canonical_path(file_name, effective_current_working_directory=None): if (not os.path.isabs(file_name)): --- 9,12 ---- |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-24 23:28:45
|
Update of /cvsroot/cctbx/libtbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31275 Modified Files: configure.py Added Files: windows_dispatcher.c Removed Files: dispatcher_front_end.c dispatcher_front_end.exe Log Message: major setpaths overhaul --- dispatcher_front_end.exe DELETED --- --- NEW FILE: windows_dispatcher.c --- #include <process.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> static const char* /* WINDOWS_DISPATCHER interleaved with random digits */ unique_pattern = "0W6I0N6D0O2W8S5_0D0I8S1P4A3T6C4H9E4R7"; static char* /* LIBTBX_BUILD interleaved with random digits */ libtbx_build = "LIBTBX_BUILD=" "3L0I2B2T9B4X2_8B5U5I5L2D4_3L0I2B2T9B4X2_8B5U5I5L2D4_3L0I2B2T9B4X2_8B5U5I5L2D4" "_3L0I2B2T9B4X2_8B5U5I5L2D4_3L0I2B2T9B4X2_8B5U5I5L2D4_3L0I2B2T9B4X2_8B5U5I5L2D" "4_3L0I2B2T9B4X2_8B5U5I5L2D4_3L0I2B2T9B4X2_8B5U5I5L2D4_3L0I2B2T9B4X2_8B5U5I5L2" "D4_3L0I2B2T9B4X2_8B5U5I5"; static char* /* PYTHON_EXECUTABLE interleaved with random digits */ python_executable = "5P2Y5T7H2O5N8_0E7X9E7C8U6T4A9B9L5E3_5P2Y5T7H2O5N8_0E7X9E7C8U6T4A9B9L5E3_5P2Y5" "T7H2O5N8_0E7X9E7C8U6T4A9B9L5E3_5P2Y5T7H2O5N8_0E7X9E7C8U6T4A9B9L5E3_5P2Y5T7H2O" "5N8_0E7X9E7C8U6T4A9B9L5E3_5P2Y5T7H2O5N8_0E7X9E7C8U6T4A9B9L5E3_5P2Y5T7H2O5N8_0" "E7X9E7C8U6T4A9B9L5E3_5P2"; static char* /* PYTHONPATH interleaved with random digits */ pythonpath = "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2" "N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_" "2P0Y1T7H3O2N7P7A2T5H8_2P0Y1T7H3O2N7P7A2T5H8_2"; static char* /* MAIN_PATH interleaved with random digits */ main_path = "1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9" "H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A" "0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8" "P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N" "4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1" "I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M" "5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P7A0T9H9_1M5A1I0N4_8P"; static char* /* TARGET_COMMAND interleaved with random digits */ target_command = "5T4A3R7G8E3T7_6C5O0M0M3A8N8D2_5T4A3R7G8E3T7_6C5O0M0M3A8N8D2_5T4A3R7G8E3T7_6C5" "O0M0M3A8N8D2_5T4A3R7G8E3T7_6C5O0M0M3A8N8D2_5T4A3R7G8E3T7_6C5O0M0M3A8N8D2_5T4A" "3R7G8E3T7_6C5O0M0M3A8N8D2_5T4A3R7G8E3T7_6C5O0M0M3A8N8D2_5T4A3R7G8E3T7_6C5O0M0" "M3A8N8D2_5T4A3R7G8E3T7_6"; int is_py(const char* path) { int n, i; n = strlen(path); if (n < 3) return 0; n -= 3; for(i=0;i<3;i++,n++) { if (tolower(path[n]) != ".py"[i]) return 0; } return 1; } void* malloc_certain(const char* argv0, unsigned long n) { void* ptr; errno = 0; ptr = malloc(n); if (ptr == NULL) { fprintf(stderr, "%s: error allocating %lu bytes", argv0, n); if (errno) { fprintf(stderr, ": %s", strerror(errno)); } fprintf(stderr, "\n"); exit(2); } return ptr; } void prepend_path_element( const char* argv0, const char* var_name, const char* additional_element) { const char* original_value; char* buffer; size_t sz; original_value = getenv(var_name); sz = strlen(var_name) + 1 + strlen(additional_element) + 1; if (original_value != NULL) sz += 1 + strlen(original_value); buffer = malloc_certain(argv0, sz); strcpy(buffer, var_name); strcat(buffer, "="); strcat(buffer, additional_element); if (original_value != NULL) { strcat(buffer, ";"); strcat(buffer, original_value); } _putenv(buffer); } int main(int argc, char *const argv[]) { char** extended_argv; int n, i; _putenv("PYTHONHOME="); _putenv(libtbx_build); prepend_path_element(argv[0], "PYTHONPATH", pythonpath); prepend_path_element(argv[0], "PATH", main_path); extended_argv = malloc_certain(argv[0], (argc + 2) * sizeof(char*)); n = 0; if (is_py(target_command)) { extended_argv[n++] = python_executable; } extended_argv[n++] = target_command; for(i=1;i<argc;i++,n++) { extended_argv[n] = malloc_certain(argv[0], strlen(argv[i]) + 3); strcpy(extended_argv[n], "\""); strcat(extended_argv[n], argv[i]); strcat(extended_argv[n], "\""); } extended_argv[n] = NULL; _flushall(); _fileinfo = 1; _spawnv(_P_WAIT, extended_argv[0], extended_argv); if (errno) { fprintf(stderr, "%s: error starting %s: %s\n", argv[0], extended_argv[0], strerror(errno)); exit(3); } return 0; } --- dispatcher_front_end.c DELETED --- Index: configure.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/configure.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** configure.py 13 Jun 2004 03:50:09 -0000 1.19 --- configure.py 24 Feb 2005 23:28:19 -0000 1.20 *************** *** 14,20 **** if (os.name == "nt"): open("shortpath.bat", "w").write("@echo off\necho %~s1\n") - from os.path import normpath, join, dirname - libtbx_libtbx = normpath(join(dirname(sys.argv[0]), "libtbx")) - sys.path.insert(0, libtbx_libtbx) from libtbx.command_line import configure configure.cold_start(sys.argv) --- 14,17 ---- |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-24 23:28:30
|
Update of /cvsroot/cctbx/libtbx/libtbx/command_line In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31275/libtbx/command_line Modified Files: configure.py path_utility.py refresh.py scons.py Added Files: printenv.bat printenv.sh show_bin_path.py show_build_path.py show_dist_paths.py show_lib_path.py valgrind.sh Removed Files: env_run.py Log Message: major setpaths overhaul --- NEW FILE: show_dist_paths.py --- import libtbx.env import sys if (len(sys.argv) == 1): for path in libtbx.env.cache.dist_paths.values(): print path else: for arg in sys.argv[1:]: print libtbx.env.cache.dist_path(arg, None) Index: scons.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/scons.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** scons.py 20 Feb 2005 04:09:53 -0000 1.4 --- scons.py 24 Feb 2005 23:28:20 -0000 1.5 *************** *** 2,8 **** import sys, os ! engine = libtbx.env.under_dist_root("scons/engine") if (not os.path.isdir(engine)): ! engine = libtbx.env.under_dist_root("scons/src/engine") sys.path.insert(0, engine) try: import SCons --- 2,8 ---- import sys, os ! engine = libtbx.env.under_dist("libtbx", "../scons/engine") if (not os.path.isdir(engine)): ! engine = libtbx.env.under_dist("libtbx", "../scons/src/engine") sys.path.insert(0, engine) try: import SCons Index: path_utility.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/path_utility.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** path_utility.py 10 Dec 2003 19:37:20 -0000 1.3 --- path_utility.py 24 Feb 2005 23:28:20 -0000 1.4 *************** *** 1,4 **** - #! /usr/bin/env python - import sys, os --- 1,2 ---- *************** *** 36,39 **** --- 34,39 ---- remaining_env_paths.append(path) remaining_env_paths_norm.append(norm(path)) + if (os.name == "nt" and len(remaining_env_paths) == 0): + return "E_M_P_T_Y" return os.pathsep.join(remaining_env_paths) --- NEW FILE: printenv.bat --- @echo off call %LIBTBX_BUILD%\setpaths.bat all set --- NEW FILE: show_build_path.py --- import libtbx.env print libtbx.env.build_path --- NEW FILE: printenv.sh --- #! /bin/sh . $LIBTBX_BUILD/setpaths.sh all printenv --- env_run.py DELETED --- --- NEW FILE: valgrind.sh --- #! /bin/sh if [ ! -n "$LIBTBX_VALGRIND" ]; then echo 'Error: $LIBTBX_VALGRIND is not defined.' exit 1 fi valgrind --version if [ $? -eq 0 ]; then LIBTBX__VALGRIND_FLAG__=1 export LIBTBX__VALGRIND_FLAG__ exec "$@" fi --- NEW FILE: show_lib_path.py --- import libtbx.env print libtbx.env.under_build("libtbx") --- NEW FILE: show_bin_path.py --- import libtbx.env print libtbx.env.under_build("libtbx/bin") Index: refresh.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/refresh.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** refresh.py 20 Feb 2005 04:09:53 -0000 1.24 --- refresh.py 24 Feb 2005 23:28:20 -0000 1.25 *************** *** 1,64 **** ! #! /usr/bin/env python ! import libtbx.config ! import sys, os ! from os.path import normpath, join, split, isdir, isfile, islink, splitext norm = normpath ! class create_bin_sh_dispatcher: ! ! def __init__(self, python_exe, precall_commands): ! self.python_exe = python_exe ! self.precall_commands = precall_commands ! ! def __call__(self, source_file, target_file): ! f = open(target_file, "w") ! print >> f, '#! /bin/sh' ! print >> f, '# LIBTBX_DISPATCHER DO NOT EDIT' ! print >> f, 'unset PYTHONHOME' ! essentials = ["PYTHONPATH"] ! if (sys.platform.startswith("darwin")): ! essentials.append("DYLD_LIBRARY_PATH") ! else: ! essentials.append("LD_LIBRARY_PATH") ! for v in essentials: ! print >> f, 'if [ -n "$LIBTBX0%s" ]; then' % v ! print >> f, ' if [ ! -n "$%s" ]; then' % v ! print >> f, ' %s="$LIBTBX0%s"' % (v, v) ! print >> f, ' export %s' % v ! print >> f, ' elif [ "$%s" != "$LIBTBX0%s" ]; then' % (v, v) ! print >> f, ' x=`echo "$%s" | grep libtbx`' % v ! print >> f, ' if [ ! -n "$x" ]; then' ! print >> f, ' %s="$LIBTBX0%s:$%s"' % (v, v, v) ! print >> f, ' export %s' % v ! print >> f, ' fi' ! print >> f, ' fi' ! print >> f, 'fi' ! if (self.precall_commands is not None): ! for line in self.precall_commands: ! print >> f, line ! cmd = " exec" ! if ( source_file != self.python_exe ! and source_file.lower().endswith(".py")): ! cmd += " '"+self.python_exe+"'" ! print >> f, "if [ $# -eq 0 ]; then" ! print >> f, cmd, "'"+source_file+"'" ! print >> f, "else" ! print >> f, cmd, "'"+source_file+"'", '"$@"' ! print >> f, "fi" ! f.close() ! os.chmod(target_file, 0755) ! ! class create_win32_dispatcher: ! ! def __init__(self, dispatcher_front_end_exe): ! self.dispatcher_front_end_exe = dispatcher_front_end_exe ! ! def __call__(self, source_file, target_file): ! open(target_file+".exe", "wb").write(self.dispatcher_front_end_exe) ! ! def create_driver(libtbx_env, precall_commands, ! target_dir, package_name, source_dir, file_name, ! dispatcher_dict): source_file = norm(join(source_dir, file_name)) if (not isfile(source_file)): return --- 1,9 ---- ! import libtbx.env import libtbx.config ! import os ! from os.path import normpath, join, isdir, isfile, splitext norm = normpath ! def create_dispatcher(target_dir, package_name, source_dir, file_name): source_file = norm(join(source_dir, file_name)) if (not isfile(source_file)): return *************** *** 66,225 **** if (file_name.lower().endswith(".pyc")): return if (file_name[0] == "."): return target_file = norm(join(target_dir, package_name)) if (file_name.lower() != "main.py"): target_file += "." + splitext(file_name)[0] ! if (os.name == "nt"): ! if (not file_name.lower().endswith(".py")): return ! action = create_win32_dispatcher( ! dispatcher_front_end_exe=libtbx_env.dispatcher_front_end_exe()) ! else: ! action = create_bin_sh_dispatcher( ! python_exe=libtbx_env.LIBTBX_PYTHON_EXE, ! precall_commands=precall_commands) ! try: os.chmod(source_file, 0755) ! except: pass ! if (isfile(target_file) or islink(target_file)): ! try: os.remove(target_file) ! except OSError: pass ! else: action(source_file, target_file) ! else: ! action(source_file, target_file) ! dispatcher_dict[os.path.basename(target_file).lower()] = source_file ! def create_drivers(libtbx_env, precall_commands, ! target_dir, package_name, source_dir, ! dispatcher_dict): if (not isdir(source_dir)): return print "Processing:", source_dir for file_name in os.listdir(source_dir): ! create_driver( ! libtbx_env=libtbx_env, ! precall_commands=precall_commands, target_dir=target_dir, package_name=package_name, source_dir=source_dir, ! file_name=file_name, ! dispatcher_dict=dispatcher_dict) ! ! def create_dispatcher_back_end(libtbx_env, dispatcher_dict): ! dispatcher_path = norm(join(libtbx_env.LIBTBX_BUILD, "dispatcher")) ! f = open(dispatcher_path, "w") ! print >> f, "import sys, os" ! print >> f, "scripts = {" ! for item in dispatcher_dict.items(): ! print >> f, '"%s": r"%s",' % item ! print >> f, "}" ! print >> f, """\ ! cmd = os.path.basename(sys.argv[1]).lower() ! if (cmd.endswith(".exe")): ! cmd = cmd[:-4] ! script = scripts.get(cmd, None) ! if (script is None): ! raise RuntimeError("Unknown script: %s" % cmd) ! sys.argv = sys.argv[1:] ! execfile(script) ! """ ! f.close() ! ! def create_posix_icc_ld_preload(libtbx_env): ! path_icc = libtbx.config.full_path("icc") ! if (path_icc is None): return None ! path_lib = os.sep.join(path_icc.split(os.sep)[:-2] + ["lib"]) ! if (not os.path.isdir(path_lib)): return None ! ld_preload = [] ! path_libirc_a = os.path.join(path_lib, "libirc.a") ! path_libirc_so = os.path.join(path_lib, "libirc.so") ! if (os.path.isfile(path_libirc_so)): ! ld_preload.append(path_libirc_so) ! else: ! if (os.path.isfile(path_libirc_a)): ! path_libirc_so = os.path.join( ! libtbx_env.LIBTBX_BUILD, "libtbx", "libirc.so") ! cmd = "%(path_icc)s -shared -o %(path_libirc_so)s %(path_libirc_a)s" \ ! % vars() ! print cmd ! sys.stdout.flush() ! os.system(cmd) ! ld_preload.append(path_libirc_so) ! path_libunwind_so = None ! best_version = None ! for file_name in os.listdir(path_lib): ! if (file_name.startswith("libunwind.so.")): ! try: version = int(file_name.split(".")[2]) ! except: version = None ! if (version is not None): ! if (best_version is None or version > best_version): ! path_libunwind_so = os.path.join(path_lib, file_name) ! best_version = version ! if (path_libunwind_so is not None): ! ld_preload.append(path_libunwind_so) ! if (len(ld_preload) == 0): return None ! return [ ! 'LD_PRELOAD="%s"' % os.pathsep.join(ld_preload), ! 'export LD_PRELOAD'] ! ! def assemble_dispatcher_precall_commands(libtbx_env): ! lines = [] ! if ( libtbx_env.python_version_major_minor == (2,2) ! and sys.platform == "linux2" ! and os.path.isfile("/etc/redhat-release")): ! try: red_hat_linux_release = open("/etc/redhat-release").readline() ! except: pass ! else: ! if ( red_hat_linux_release.startswith("Red Hat Linux release") ! and red_hat_linux_release.split()[4] == "9"): ! lines.extend([ ! 'if [ ! -n "$LD_ASSUME_KERNEL" ]; then', ! ' LD_ASSUME_KERNEL=2.4.1', ! ' export LD_ASSUME_KERNEL', ! 'fi']) ! if (os.name == "posix" and libtbx_env.compiler == "icc"): ! addl_lines = create_posix_icc_ld_preload(libtbx_env) ! if (addl_lines is None): ! raise libtbx.config.UserError("Cannot determine LD_PRELOAD for icc.") ! lines.extend(addl_lines) ! return lines ! ! def create_python_dispatchers(libtbx_env, target_dir, precall_commands): ! python_exe = libtbx_env.LIBTBX_PYTHON_EXE ! for file_name in ("libtbx.python", "python"): ! target_file = norm(join(target_dir, file_name)) ! if (os.name == "nt"): ! action = create_win32_dispatcher( ! dispatcher_front_end_exe=libtbx_env.dispatcher_front_end_exe()) ! else: ! action = create_bin_sh_dispatcher( ! python_exe=python_exe, ! precall_commands=precall_commands) ! try: os.chmod(source_file, 0755) ! except: pass ! if (isfile(target_file) or islink(target_file)): ! try: os.remove(target_file) ! except OSError: pass ! else: action(python_exe, target_file) ! else: ! action(python_exe, target_file) ! ! def create_show_build_path(libtbx_env, target_dir): ! target_file = os.path.join(target_dir, "libtbx.show_build_path") ! f = open(target_file, "w") ! print >> f, '#! /bin/sh' ! print >> f, '# LIBTBX_DISPATCHER DO NOT EDIT' ! print >> f, 'echo "%s"' % libtbx_env.LIBTBX_BUILD ! f.close() ! os.chmod(target_file, 0755) def run(): ! libtbx_env = libtbx.config.env() ! target_dir = norm(join(libtbx_env.LIBTBX_BUILD, "libtbx/bin")) if (not isdir(target_dir)): os.makedirs(target_dir) ! precall_commands = assemble_dispatcher_precall_commands(libtbx_env) ! create_python_dispatchers( ! libtbx_env=libtbx_env, ! target_dir=target_dir, ! precall_commands=precall_commands) ! dispatcher_dict = {} ! for dist_path in libtbx_env.dist_paths.values(): dist_root = os.path.dirname(dist_path) package_name = os.path.basename(dist_path) --- 11,43 ---- if (file_name.lower().endswith(".pyc")): return if (file_name[0] == "."): return + if (os.name == "nt"): + ext = splitext(file_name)[1].lower() + if (ext not in libtbx.config.windows_pathext): return target_file = norm(join(target_dir, package_name)) if (file_name.lower() != "main.py"): target_file += "." + splitext(file_name)[0] ! libtbx.env.cache.create_dispatcher( ! source_file=source_file, ! target_file=target_file) ! def create_dispatchers(target_dir, package_name, source_dir): if (not isdir(source_dir)): return print "Processing:", source_dir for file_name in os.listdir(source_dir): ! create_dispatcher( target_dir=target_dir, package_name=package_name, source_dir=source_dir, ! file_name=file_name) def run(): ! target_dir = libtbx.env.under_build("libtbx/bin") if (not isdir(target_dir)): os.makedirs(target_dir) ! for file_name in ("libtbx.python", "python"): ! libtbx.env.cache.create_dispatcher( ! source_file=libtbx.env.cache.LIBTBX_PYTHON_EXE, ! target_file=norm(join(target_dir, file_name))) ! for dist_path in libtbx.env.cache.dist_paths.values(): dist_root = os.path.dirname(dist_path) package_name = os.path.basename(dist_path) *************** *** 227,243 **** name=package_name, dist_root=dist_root).primary_first(): ! create_drivers( ! libtbx_env=libtbx_env, ! precall_commands=precall_commands, target_dir=target_dir, package_name=package_name, ! source_dir=norm(join(dist_path_suf, package_name, "command_line")), ! dispatcher_dict=dispatcher_dict) ! if (os.name == "nt"): ! create_dispatcher_back_end( ! libtbx_env=libtbx_env, ! dispatcher_dict=dispatcher_dict) ! else: ! create_show_build_path(libtbx_env=libtbx_env, target_dir=target_dir) if (__name__ == "__main__"): --- 45,60 ---- name=package_name, dist_root=dist_root).primary_first(): ! create_dispatchers( target_dir=target_dir, package_name=package_name, ! source_dir=norm(join(dist_path_suf, package_name, "command_line"))) ! exe_path = norm(join(libtbx.env.cache.LIBTBX_BUILD, "exe")) ! if (os.path.isdir(exe_path)): ! print "Processing:", exe_path ! for file_name in os.listdir(exe_path): ! if (file_name[0] == "."): continue ! libtbx.env.cache.create_dispatcher( ! source_file=norm(join(exe_path, file_name)), ! target_file=norm(join(target_dir, file_name))) if (__name__ == "__main__"): Index: configure.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/configure.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** configure.py 20 Feb 2005 04:09:53 -0000 1.50 --- configure.py 24 Feb 2005 23:28:20 -0000 1.51 *************** *** 7,11 **** import libtbx.config import libtbx.path ! from libtbx.config import UserError class registry: --- 7,11 ---- import libtbx.config import libtbx.path ! from libtbx.utils import UserError class registry: *************** *** 102,107 **** try: p = package(self.dist_root, package_name) ! except UserError: ! pass else: if (p.dist_path is not None): --- 102,107 ---- try: p = package(self.dist_root, package_name) ! except UserError, e: ! e.reset_tracebacklimit() else: if (p.dist_path is not None): *************** *** 122,140 **** def __init__(self, cwd, libtbx_dist): self.python_version_major_minor = sys.version_info[:2] if (os.name == "nt"): ! self.LIBTBX_PYTHON_EXE = norm(abspath(join(sys.prefix, "python.exe"))) else: ! self.LIBTBX_PYTHON_EXE = norm(abspath(join(sys.prefix, "bin", "python"))) ! self.LIBTBX_BUILD = norm(abspath(os.getcwd())) ! self.LIBTBX_DIST_ROOT = norm(dirname(libtbx_dist)) self.LD_LIBRARY_PATH = [norm(join(self.LIBTBX_BUILD, "libtbx"))] self.PYTHONPATH = [norm(join(self.LIBTBX_BUILD, "libtbx")), libtbx_dist] self.PATH = [norm(join(self.LIBTBX_BUILD, "libtbx/bin"))] self.package_list = [] self.effective_roots = [] self.dist_paths = {"LIBTBX_DIST": libtbx_dist} self.scons_in_dist_root = False ! if (os.path.isdir(join(self.LIBTBX_DIST_ROOT, "scons"))): self.scons_in_dist_root = True --- 122,149 ---- def __init__(self, cwd, libtbx_dist): + self.LIBTBX_BUILD = norm(abspath(os.getcwd())) + self._shortpath_bat = None + self.LIBTBX_BUILD = self.abs_path_clean(self.LIBTBX_BUILD) + libtbx_dist = self.abs_path_clean(libtbx_dist) self.python_version_major_minor = sys.version_info[:2] if (os.name == "nt"): ! self.LIBTBX_PYTHON_EXE = self.abs_path_clean(join( ! sys.prefix, "python.exe")) else: ! self.LIBTBX_PYTHON_EXE = self.abs_path_clean(join( ! sys.prefix, "bin/python")) self.LD_LIBRARY_PATH = [norm(join(self.LIBTBX_BUILD, "libtbx"))] self.PYTHONPATH = [norm(join(self.LIBTBX_BUILD, "libtbx")), libtbx_dist] self.PATH = [norm(join(self.LIBTBX_BUILD, "libtbx/bin"))] + self.libtbx_dist_root = dirname(libtbx_dist) + self.libtbx_python = norm(join( + self.LIBTBX_BUILD,"libtbx","bin","libtbx.python")) + self.libtbx_path_utility = norm(join( + libtbx_dist, "libtbx/command_line/path_utility.py")) self.package_list = [] self.effective_roots = [] self.dist_paths = {"LIBTBX_DIST": libtbx_dist} self.scons_in_dist_root = False ! if (os.path.isdir(join(self.libtbx_dist_root, "scons"))): self.scons_in_dist_root = True *************** *** 146,150 **** and package.effective_root_adaptbx not in self.effective_roots): self.effective_roots.append(package.effective_root_adaptbx) ! self.dist_paths[package.name.upper() + "_DIST"] = package.dist_path if (not explicit_adaptbx): ppn = libtbx.config.package_pair(name=package.name) --- 155,160 ---- and package.effective_root_adaptbx not in self.effective_roots): self.effective_roots.append(package.effective_root_adaptbx) ! self.dist_paths[package.name.upper() + "_DIST"] = self.abs_path_clean( ! package.dist_path) if (not explicit_adaptbx): ppn = libtbx.config.package_pair(name=package.name) *************** *** 153,157 **** name=package.name, dist_root=package.dist_root) ! self.dist_paths[ppn.adaptbx.upper() + "_DIST"] = ppd.adaptbx if (package.python_path is not None): insert_normed_path(self.PYTHONPATH, package.python_path) --- 163,168 ---- name=package.name, dist_root=package.dist_root) ! self.dist_paths[ppn.adaptbx.upper() + "_DIST"] = self.abs_path_clean( ! ppd.adaptbx) if (package.python_path is not None): insert_normed_path(self.PYTHONPATH, package.python_path) *************** *** 182,258 **** + " used to build binaries: %s") % (api_from_process, api_from_build)) ! def emit_setpaths_sh(env): ! for file_name in ("setpaths.sh", "env_run.sh"): ! full_path = norm(join(env.LIBTBX_BUILD, file_name)) ! f = open_info(full_path) ! for var_name, values in env.items(): ! if (var_name.upper() != var_name): continue ! if (var_name == "LD_LIBRARY_PATH" and sys.platform.startswith("darwin")): ! var_name = "DYLD_LIBRARY_PATH" ! if (type(values) == type([])): ! val = os.pathsep.join(values) ! print >> f, 'LIBTBX_%s="%s"' % (var_name, val) ! print >> f, 'export LIBTBX_%s' % var_name ! val = "$LIBTBX_%s" % var_name ! print >> f, 'if [ ! -n "$%s" ]; then' % (var_name,) ! print >> f, ' %s="%s"' % (var_name, val) ! print >> f, 'else' ! print >> f, ' %s="%s%s$%s"' % (var_name, val, os.pathsep, var_name) ! print >> f, 'fi' ! print >> f, 'LIBTBX0%s="$%s"' % (var_name, var_name) ! print >> f, 'export LIBTBX0%s' % var_name else: ! print >> f, '%s="%s"' % (var_name, values) ! print >> f, 'export %s' % (var_name,) ! if (file_name == "env_run.sh"): ! print >> f, '"%s" "%s" "$@"' % ( ! "$LIBTBX_BUILD/libtbx/bin/libtbx.python", ! "$LIBTBX_DIST/libtbx/command_line/env_run.py") ! f.close() ! os.chmod(full_path, 0755) def emit_setpaths_csh(env): - libtbx_python = norm(join( - env.LIBTBX_BUILD, "libtbx","bin","libtbx.python")) - libtbx_path_utility = norm(join( - env.LIBTBX_DIST_ROOT, "libtbx","libtbx","command_line","path_utility.py")) setpaths_csh_path = norm(join(env.LIBTBX_BUILD, "setpaths.csh")) unsetpaths_csh_path = norm(join(env.LIBTBX_BUILD, "unsetpaths.csh")) s = open_info(setpaths_csh_path) u = open_info(unsetpaths_csh_path) for f in s, u: ! print >> f, '"%s" -V >& /dev/null' % libtbx_python ! print >> f, 'if ($status != 0 || ! -f "%s") then' % libtbx_path_utility ! print >> f, ' echo "*******************************************"' ! print >> f, ' echo "Fatal Error: Incomplete libtbx environment!"' ! print >> f, ' echo "*******************************************"' ! print >> f, ' echo "Please re-run the libtbx/configure.py command."' ! print >> f, ' echo ""' ! if (f is s): ! print >> f, 'else if ($#argv != 0 && $#argv != 1'\ ! ' || $#argv && "$1" != "minimal") then' ! print >> f, ' echo "usage: source $0 [minimal]"' print >> f, 'else' for var_name, values in env.items(): ! if (var_name.upper() != var_name): continue ! if (var_name == "LD_LIBRARY_PATH" and sys.platform.startswith("darwin")): ! var_name = "DYLD_LIBRARY_PATH" ! if (type(values) == type([])): ! val = os.pathsep.join(values) ! print >> s, ' setenv LIBTBX_%s "%s"' % (var_name, val) ! print >> u, ' unsetenv LIBTBX_%s' % var_name ! fmt_args = (var_name, libtbx_python, libtbx_path_utility, var_name, val) ! print >> s, ''' setenv %s "`'%s' '%s' prepend %s '%s'`"''' % fmt_args ! print >> u, ''' setenv %s "`'%s' '%s' delete %s '%s'`"''' % fmt_args ! print >> s, ' setenv LIBTBX0%s "$%s"' % (var_name, var_name) ! print >> u, ' unsetenv LIBTBX0%s' % var_name ! else: ! if ( var_name.endswith("_DIST") ! or var_name.endswith("_DIST_ROOT")): ! condition = "if ($#argv == 0) " ! else: ! condition = "" ! print >> s, ' %ssetenv %s "%s"' % (condition, var_name, values) ! print >> u, ' unsetenv %s' % var_name for f in s, u: print >> f, 'endif' --- 193,379 ---- + " used to build binaries: %s") % (api_from_process, api_from_build)) ! def abs_path_short(self, abs_path): ! if (os.name != "nt"): return abs_path ! if (self._shortpath_bat is None): ! self._shortpath_bat = "shortpath.bat" ! libtbx_build = self.LIBTBX_BUILD ! if (libtbx_build is not None): ! self._shortpath_bat = os.path.join(libtbx_build, self._shortpath_bat) ! assert os.path.exists(self._shortpath_bat) ! return os.popen('call "%s" "%s"' % ! (self._shortpath_bat, abs_path), "r").readline().rstrip() ! ! def abs_path_clean(self, path): ! abs_path = norm(abspath(path)) ! if (os.name != "nt"): return abs_path ! short = self.abs_path_short(abs_path).split(os.sep) ! orig = abs_path.split(os.sep) ! clean = [] ! for o,s in zip(orig, short): ! if (o.find(" ") < 0): ! clean.append(o) else: ! clean.append(s) ! return os.sep.join(clean) ! ! def write_incomplete_libtbx_environment(f): ! message = [ ! "*******************************************", ! "Fatal Error: Incomplete libtbx environment!", ! "*******************************************", ! "Please re-run the libtbx/configure.py command."] ! if (os.name != "nt"): ! for line in message: print >> f, ' echo "%s"' % line ! print >> f, ' echo ""' ! else: ! for line in message: print >> f, ' echo %s' % line ! print >> f, ' echo.' ! ! class unix_update_path: ! ! def __init__(self, env, shell, s, u): ! assert shell in ["sh", "csh"] ! self.shell = shell ! self.env = env ! self.s = s ! self.u = u ! if (self.shell == "sh"): ! self.setenv = "%s=" ! else: ! self.setenv = "setenv %s " ! ! def write(self, prefixes, var_name, val): ! val = os.pathsep.join(val) ! for f,prefix,action in [(self.s, prefixes[0], "prepend"), ! (self.u, prefixes[1], "delete")]: ! print >> f, '''%s%s"`'%s' '%s' %s %s '%s'`"''' % ( ! prefix, ! self.setenv % var_name, ! self.env.LIBTBX_PYTHON_EXE, ! self.env.libtbx_path_utility, ! action, ! var_name, ! val) ! if (f is self.s and self.shell == "sh"): ! print >> f, '%sexport %s' % (prefixes[0], var_name) ! ! class windows_update_path: ! ! def __init__(self, env, s, u): ! self.env = env ! self.s = s ! self.u = u ! ! def write(self, prefixes, var_name, val): ! val = os.pathsep.join(val) ! fmt = '''%sfor /F %%%%i in ('%s "%s" %s %s "%s"') do set %s=%%%%i''' ! for f,prefix,action in [(self.s, prefixes[0], "prepend"), ! (self.u, prefixes[1], "delete")]: ! print >> f, fmt % ( ! prefix, ! self.env.LIBTBX_PYTHON_EXE, ! self.env.libtbx_path_utility, ! action, ! var_name, ! val, ! var_name) ! print >> f, '%sif "%%%s%%" == "E_M_P_T_Y" set %s=' % ( ! prefix, var_name, var_name) ! ! def emit_setpaths_sh(env): ! setpaths_path = norm(join(env.LIBTBX_BUILD, "setpaths.sh")) ! unsetpaths_path = norm(join(env.LIBTBX_BUILD, "unsetpaths.sh")) ! s = open_info(setpaths_path) ! u = open_info(unsetpaths_path) ! update_path = unix_update_path(env, "sh", s, u) ! for f in s, u: ! print >> f, '"%s" -V > /dev/null 2>&1' % env.libtbx_python ! print >> f, \ ! 'if [ $? -ne 0 -o ! -f "%s" ]; then' % env.libtbx_path_utility ! write_incomplete_libtbx_environment(f) ! print >> f, 'else' ! update_path.write((" ", " "), "PATH", env.PATH) ! for un in ["", "un"]: ! print >> s, \ ! """ alias libtbx.%ssetpaths='source "%s/%ssetpaths.sh"'""" % ( ! un, env.LIBTBX_BUILD, un) ! print >> u, ' unalias libtbx.unsetpaths > /dev/null 2>&1' ! print >> s, ' if [ $# -ne 0 ]; then' ! print >> s, \ ! ' if [ $# -ne 1 -o \( "$1" != "all" -a "$1" != "debug" \) ]; then' ! print >> s, ' echo "usage: source setpaths.sh [all|debug]"' ! print >> s, ' else' ! print >> s, ' %s="%s"' % ("LIBTBX_BUILD", env.LIBTBX_BUILD) ! print >> s, ' export %s' % "LIBTBX_BUILD" ! print >> u, ' unset %s' % "LIBTBX_BUILD" ! for var_name, values in env.items(): ! if (not var_name.endswith("_DIST")): continue ! print >> s, ' %s="%s"' % (var_name, values) ! print >> s, ' export %s' % var_name ! print >> u, ' unset %s' % var_name ! print >> s, ' if [ "$1" == "debug" ]; then' ! update_path.write((" ", " "), "PYTHONPATH", env.PYTHONPATH) ! if (sys.platform.startswith("darwin")): ! ld_library_path = "DYLD_LIBRARY_PATH" ! else: ! ld_library_path = "LD_LIBRARY_PATH" ! update_path.write((" ", " "), ld_library_path, env.LD_LIBRARY_PATH) ! print >> s, ' fi' ! print >> s, ' fi' ! print >> s, ' fi' ! for f in s, u: ! print >> f, 'fi' ! s.close() ! u.close() ! ! def emit_env_run_sh(env): ! env_run_sh = norm(join(env.LIBTBX_BUILD, "env_run.sh")) ! f = open_info(env_run_sh) ! print >> f, '. "%s" all' % (os.path.join(env.LIBTBX_BUILD, "setpaths.sh")) ! print >> f, '"%s" "%s" "$@"' % ( ! "$LIBTBX_BUILD/libtbx/bin/python", ! "$LIBTBX_DIST/libtbx/command_line/env_run.py") ! f.close() ! os.chmod(env_run_sh, 0755) def emit_setpaths_csh(env): setpaths_csh_path = norm(join(env.LIBTBX_BUILD, "setpaths.csh")) unsetpaths_csh_path = norm(join(env.LIBTBX_BUILD, "unsetpaths.csh")) s = open_info(setpaths_csh_path) u = open_info(unsetpaths_csh_path) + update_path = unix_update_path(env, "csh", s, u) for f in s, u: ! print >> f, '"%s" -V >& /dev/null' % env.libtbx_python ! print >> f, \ ! 'if ($status != 0 || ! -f "%s") then' % env.libtbx_path_utility ! write_incomplete_libtbx_environment(f) print >> f, 'else' + update_path.write((" ", " "), "PATH", env.PATH) + for un in ["", "un"]: + print >> s, \ + """ alias libtbx.%ssetpaths 'source "%s/%ssetpaths.csh"'""" % ( + un, env.LIBTBX_BUILD, un) + print >> u, ' unalias libtbx.unsetpaths' + print >> s, ' if ($#argv != 0) then' + print >> s, \ + ' if ($#argv != 1 || ("$1" != "all" && "$1" != "debug")) then' + print >> s, ' echo "usage: source setpaths.csh [all|debug]"' + print >> s, ' else' + print >> s, ' setenv %s "%s"' % ("LIBTBX_BUILD", env.LIBTBX_BUILD) + print >> u, ' unsetenv %s' % "LIBTBX_BUILD" for var_name, values in env.items(): ! if (not var_name.endswith("_DIST")): continue ! print >> s, ' setenv %s "%s"' % (var_name, values) ! print >> u, ' unsetenv %s' % var_name ! print >> s, ' if ("$1" == "debug") then' ! update_path.write((" ", " "), "PYTHONPATH", env.PYTHONPATH) ! if (sys.platform.startswith("darwin")): ! ld_library_path = "DYLD_LIBRARY_PATH" ! else: ! ld_library_path = "LD_LIBRARY_PATH" ! update_path.write((" ", " "), ld_library_path, env.LD_LIBRARY_PATH) ! print >> s, ' endif' ! print >> s, ' endif' ! print >> s, ' endif' for f in s, u: print >> f, 'endif' *************** *** 260,286 **** u.close() - def join_path_ld_library_path(env): - joined_path = list(env.PATH) - for path in env.LD_LIBRARY_PATH: - if (not path in joined_path): - joined_path.append(path) - return joined_path - def emit_setpaths_bat(env): ! setpaths_bat_path = norm(join(env.LIBTBX_BUILD, "setpaths.bat")) ! f = open_info(setpaths_bat_path) ! print >> f, '@ECHO off' for var_name, values in env.items(): ! if (var_name.upper() != var_name): continue ! if (type(values) == type([])): ! if (var_name == "LD_LIBRARY_PATH"): continue ! if (var_name == "PATH"): ! values = join_path_ld_library_path(env) ! val = os.pathsep.join([libtbx.path.abs_path_clean(v) for v in values]) ! print >> f, 'if not defined %s set %s=' % (var_name, var_name) ! print >> f, 'set %s=%s%s%%%s%%' % (var_name, val, os.pathsep, var_name) ! else: ! print >> f, 'set %s=%s' % (var_name, libtbx.path.abs_path_clean(values)) ! f.close() class build_options_t: --- 381,424 ---- u.close() def emit_setpaths_bat(env): ! setpaths_path = norm(join(env.LIBTBX_BUILD, "setpaths.bat")) ! unsetpaths_path = norm(join(env.LIBTBX_BUILD, "unsetpaths.bat")) ! s = open_info(setpaths_path) ! u = open_info(unsetpaths_path) ! update_path = windows_update_path(env, s, u) ! for f in s, u: ! print >> f, '@ECHO off' ! print >> f, 'if not exist "%s" goto fatal_error' % env.LIBTBX_PYTHON_EXE ! print >> f, 'if not exist "%s" goto fatal_error' % env.libtbx_path_utility ! print >> f, 'if exist "%s.exe" goto update_path' % env.libtbx_python ! write_incomplete_libtbx_environment(f) ! print >> f, ' goto end_of_script' ! print >> f, ':update_path' ! update_path.write((" ", " "), "PATH", env.PATH) ! for un in ["", "un"]: ! print >> s, ' doskey libtbx.%ssetpaths="%s\\%ssetpaths.bat" $*' % ( ! un, env.LIBTBX_BUILD, un) ! print >> u, ' doskey libtbx.unsetpaths=' ! print >> s, ' if "%1" == "" goto end_of_script' ! print >> s, ' if not "%2" == "" goto show_usage' ! print >> s, ' if "%1" == "all" goto set_all' ! print >> s, ' if "%1" == "debug" goto set_all' ! print >> s, ':show_usage' ! print >> s, ' echo usage: setpaths [all^|debug]' ! print >> s, ' goto end_of_script' ! print >> s, ':set_all' ! print >> s, ' set %s="%s"' % ("LIBTBX_BUILD", env.LIBTBX_BUILD) ! print >> u, ' set %s=' % "LIBTBX_BUILD" for var_name, values in env.items(): ! if (not var_name.endswith("_DIST")): continue ! print >> s, ' set %s="%s"' % (var_name, values) ! print >> u, ' set %s=' % var_name ! print >> s, ' if not "%1" == "debug" goto end_of_script' ! update_path.write((" ", " "), "PYTHONPATH", env.PYTHONPATH) ! update_path.write((" ", " "), "PATH", env.LD_LIBRARY_PATH) ! for f in s, u: ! print >> f, ':end_of_script' ! s.close() ! u.close() class build_options_t: *************** *** 436,443 **** packages = registry() for arg in args: ! packages.merge(package(env.LIBTBX_DIST_ROOT, arg).dependency_registry) if (len(packages.list) == 0): show_help(old_env) raise UserError("At least one package must be specified.") if (len(packages.missing_for_build) == 0): build_options.report() --- 574,582 ---- packages = registry() for arg in args: ! packages.merge(package(env.libtbx_dist_root, arg).dependency_registry) if (len(packages.list) == 0): show_help(old_env) raise UserError("At least one package must be specified.") + print "Python:", sys.version.split()[0], sys.executable if (len(packages.missing_for_build) == 0): build_options.report() *************** *** 465,468 **** --- 604,608 ---- if (hasattr(os, "symlink")): emit_setpaths_sh(env) + emit_env_run_sh(env) emit_setpaths_csh(env) else: *************** *** 481,485 **** print "Error:", e else: - sys.path.insert(0, norm(join(env.dist_paths["LIBTBX_DIST"], "libtbx"))) os.environ["LIBTBX_BUILD"] = env.LIBTBX_BUILD from libtbx.command_line import refresh --- 621,624 ---- *************** *** 494,498 **** "Current working directory must be: " + old_env.LIBTBX_BUILD) run( ! libtbx_dist=old_env.dist_paths["LIBTBX_DIST"], args=args[1:], old_env=old_env) --- 633,637 ---- "Current working directory must be: " + old_env.LIBTBX_BUILD) run( ! libtbx_dist=old_env.dist_path("libtbx"), args=args[1:], old_env=old_env) |
|
From: Pavel A. <af...@us...> - 2005-02-24 00:55:46
|
Update of /cvsroot/cctbx/cctbx/cctbx/xray In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31376 Modified Files: target_functors.py Log Message: new ls targets Index: target_functors.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/xray/target_functors.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** target_functors.py 28 Jan 2005 16:38:36 -0000 1.15 --- target_functors.py 24 Feb 2005 00:55:22 -0000 1.16 *************** *** 29,33 **** scale_factor = 0): adopt_init_args(self, locals()) ! assert self.target_name in ("ml","ls","mlhl") assert self.f_obs.data().size() == self.flags.size() if(self.flags.count(True) > 0): --- 29,37 ---- scale_factor = 0): adopt_init_args(self, locals()) ! assert self.target_name in ("ls_wunit_k1","ls_wunit_k2","ls_wunit_kunit", ! "ls_wexp_k1" ,"ls_wexp_k2" ,"ls_wexp_kunit", ! "ls_wff_k1" ,"ls_wff_k2" ,"ls_wff_kunit", ! "lsm_k1" ,"lsm_k2" ,"lsm_kunit", ! "ml","mlhl") assert self.f_obs.data().size() == self.flags.size() if(self.flags.count(True) > 0): *************** *** 52,56 **** self.abcd_w, self.abcd_t = None, None if(self.weights is not None): ! assert self.target_name == "ls" if(self.flags.count(True) > 0): self.weights_w = self.weights.select(~self.flags) --- 56,60 ---- self.abcd_w, self.abcd_t = None, None if(self.weights is not None): ! assert self.target_name.count("ls")+self.target_name.count("k") == 2 if(self.flags.count(True) > 0): self.weights_w = self.weights.select(~self.flags) *************** *** 74,83 **** if(self.abcd_w is not None): abcd = self.abcd_w.select(selection) else: abcd = self.abcd_w ! if(self.target_name == "ls"): ! return least_squares_residual( ! f_obs = f_obs, ! weights = weights, ! use_sigmas_as_weights = self.use_sigmas_as_weights, ! scale_factor = self.scale_factor) if(self.target_name == "ml"): return maximum_likelihood_criterion(f_obs = f_obs) --- 78,99 ---- if(self.abcd_w is not None): abcd = self.abcd_w.select(selection) else: abcd = self.abcd_w ! if(self.target_name.count("k1") == 1): ! assert self.scale_factor == 0 ! return ls_k1(f_obs = f_obs, ! weights = weights, ! scale_factor = self.scale_factor, ! fix_scale_factor = False) ! if(self.target_name.count("k2") == 1): ! assert self.scale_factor == 0 ! return ls_k2(f_obs = f_obs, ! weights = weights, ! scale_factor = self.scale_factor, ! fix_scale_factor = False) ! if(self.target_name.count("kunit") == 1): ! assert self.scale_factor == 1 ! return ls_k1(f_obs = f_obs, ! weights = weights, ! scale_factor = self.scale_factor, ! fix_scale_factor = True) if(self.target_name == "ml"): return maximum_likelihood_criterion(f_obs = f_obs) *************** *** 99,108 **** if(self.abcd_t is not None): abcd = self.abcd_t.select(selection) else: abcd = self.abcd_t ! if(self.target_name == "ls"): ! return least_squares_residual( ! f_obs = f_obs, ! weights = weights, ! use_sigmas_as_weights = self.use_sigmas_as_weights, ! scale_factor = self.scale_factor) if(self.target_name == "ml"): return maximum_likelihood_criterion(f_obs = f_obs) --- 115,136 ---- if(self.abcd_t is not None): abcd = self.abcd_t.select(selection) else: abcd = self.abcd_t ! if(self.target_name.count("k1") == 1): ! assert self.scale_factor == 0 ! return ls_k1(f_obs = f_obs, ! weights = weights, ! scale_factor = self.scale_factor, ! fix_scale_factor = False) ! if(self.target_name.count("k2") == 1): ! assert self.scale_factor == 0 ! return ls_k2(f_obs = f_obs, ! weights = weights, ! scale_factor = self.scale_factor, ! fix_scale_factor = False) ! if(self.target_name.count("kunit") == 1): ! assert self.scale_factor == 1 ! return ls_k1(f_obs = f_obs, ! weights = weights, ! scale_factor = self.scale_factor, ! fix_scale_factor = True) if(self.target_name == "ml"): return maximum_likelihood_criterion(f_obs = f_obs) *************** *** 112,115 **** --- 140,206 ---- abcd = abcd.data()) + class ls_k1: + + def __init__(self, f_obs, + weights, + scale_factor, + fix_scale_factor): + adopt_init_args(self, locals(), hide=True) + if(self._fix_scale_factor == True): + assert self._scale_factor > 0.0 + + def f_obs(self): + return self._f_obs + + def weights(self): + return self._weights + + def scale_factor(self): + return self._scale_factor + + def __call__(self, f_calc, compute_derivatives): + assert f_calc.unit_cell().is_similar_to( + self.f_obs().unit_cell()) + assert f_calc.space_group() == self.f_obs().space_group() + assert f_calc.data().size() == self.f_obs().data().size() + return ext.ls_target_with_scale_k1( + f_obs = self.f_obs().data(), + weights = self.weights(), + f_calc = f_calc.data(), + compute_derivatives = compute_derivatives, + fix_scale = self._fix_scale_factor, + scale = self._scale_factor) + + class ls_k2: + + def __init__(self, f_obs, + weights, + scale_factor, + fix_scale_factor): + adopt_init_args(self, locals(), hide=True) + if(self._fix_scale_factor == True): + assert self._scale_factor > 0.0 + + def f_obs(self): + return self._f_obs + + def weights(self): + return self._weights + + def scale_factor(self): + return self._scale_factor + + def __call__(self, f_calc, compute_derivatives): + assert f_calc.unit_cell().is_similar_to( + self.f_obs().unit_cell()) + assert f_calc.space_group() == self.f_obs().space_group() + assert f_calc.data().size() == self.f_obs().data().size() + return ext.ls_target_with_scale_k2( + f_obs = self.f_obs().data(), + weights = self.weights(), + f_calc = f_calc.data(), + compute_derivatives = compute_derivatives, + fix_scale = self._fix_scale_factor, + scale = self._scale_factor) class least_squares_residual: |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:11
|
Update of /cvsroot/cctbx/iotbx/iotbx/xplor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23122/iotbx/xplor Modified Files: tst_xplormap.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: tst_xplormap.py =================================================================== RCS file: /cvsroot/cctbx/iotbx/iotbx/xplor/tst_xplormap.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tst_xplormap.py 22 Jan 2005 14:18:26 -0000 1.14 --- tst_xplormap.py 20 Feb 2005 04:10:57 -0000 1.15 *************** *** 7,10 **** --- 7,11 ---- from scitbx.python_utils.math_utils import iround from libtbx.test_utils import approx_equal, eps_eq + import libtbx.env import sys, os *************** *** 37,42 **** end """ ! return os.path.join(os.environ["LIBTBX_DIST_ROOT"], ! "regression", "misc", "cns.map") def read_xplor(file_name): --- 38,42 ---- end """ ! return libtbx.env.under_dist_root("regression/misc/cns.map") def read_xplor(file_name): |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:11
|
Update of /cvsroot/cctbx/iotbx/iotbx/pdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23122/iotbx/pdb Modified Files: tst_pdb.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: tst_pdb.py =================================================================== RCS file: /cvsroot/cctbx/iotbx/iotbx/pdb/tst_pdb.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tst_pdb.py 4 Feb 2005 02:58:51 -0000 1.28 --- tst_pdb.py 20 Feb 2005 04:10:57 -0000 1.29 *************** *** 10,13 **** --- 10,14 ---- from cctbx.array_family import flex import scitbx.math + import libtbx.env from cStringIO import StringIO import sys, os *************** *** 145,150 **** def exercise_interpretation(verbose=0, quick=True): ! pdb_dir = os.path.join(os.environ["LIBTBX_DIST_ROOT"], ! "regression", "pdb") if (not os.path.isdir(pdb_dir)): print "Skipping exercise_interpretation(): input file not available" --- 146,150 ---- def exercise_interpretation(verbose=0, quick=True): ! pdb_dir = libtbx.env.under_dist_root("regression/pdb") if (not os.path.isdir(pdb_dir)): print "Skipping exercise_interpretation(): input file not available" |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:11
|
Update of /cvsroot/cctbx/iotbx/iotbx/mtz In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23122/iotbx/mtz Modified Files: extract_from_symop_lib.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: extract_from_symop_lib.py =================================================================== RCS file: /cvsroot/cctbx/iotbx/iotbx/mtz/extract_from_symop_lib.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** extract_from_symop_lib.py 20 Oct 2004 20:00:08 -0000 1.5 --- extract_from_symop_lib.py 20 Feb 2005 04:10:56 -0000 1.6 *************** *** 1,17 **** from cctbx import sgtbx import os ! def environ_based_path(path_elements): ! if (os.environ.has_key(path_elements[0])): ! return os.path.normpath(os.sep.join( ! [os.environ[path_elements[0]]] + path_elements[1:])) ! return None def ccp4_symbol(space_group_info): found_at_least_one_symop_lib = False ! for symop_lib_path in ( ! environ_based_path(["CCP4_LIB", "data", "symop.lib"]), ! environ_based_path(["CCP4IO_DIST", "lib", "data", "symop.lib"])): ! if (symop_lib_path is not None): found_at_least_one_symop_lib = True file_iter = iter(open(symop_lib_path, "r")) --- 1,19 ---- from cctbx import sgtbx + import libtbx.env import os ! try: ! ccp4io_dist = libtbx.env.dist_path("ccp4io") ! except KeyError: ! ccp4io_dist = None def ccp4_symbol(space_group_info): + symop_lib_paths = [os.path.expandvars("$CCP4_LIB/data/symop.lib")] + if (ccp4io_dist is not None): + symop_lib_paths.append(os.path.normpath(os.path.join( + ccp4io_dist, "lib/data/symop.lib"))) found_at_least_one_symop_lib = False ! for symop_lib_path in symop_lib_paths: ! if (os.path.isfile(symop_lib_path)): found_at_least_one_symop_lib = True file_iter = iter(open(symop_lib_path, "r")) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:11
|
Update of /cvsroot/cctbx/iotbx/include/iotbx/mtz In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23122/include/iotbx/mtz Modified Files: tst_ext.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: tst_ext.py =================================================================== RCS file: /cvsroot/cctbx/iotbx/include/iotbx/mtz/tst_ext.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tst_ext.py 22 Jan 2005 14:18:25 -0000 1.5 --- tst_ext.py 20 Feb 2005 04:10:56 -0000 1.6 *************** *** 6,9 **** --- 6,10 ---- from libtbx.itertbx import count from libtbx.test_utils import approx_equal + import libtbx.env from cStringIO import StringIO import sys, os *************** *** 41,46 **** assert mtz_object.n_crystals() == 0 assert mtz_object.n_active_crystals() == 0 ! file_name = os.path.expandvars( ! "$LIBTBX_DIST_ROOT/regression/reflection_files/dano.mtz") if (not os.path.isfile(file_name)): print "Skipping dano.mtz test: input file not available" --- 42,47 ---- assert mtz_object.n_crystals() == 0 assert mtz_object.n_active_crystals() == 0 ! file_name = libtbx.env.under_dist_root( ! "regression/reflection_files/dano.mtz") if (not os.path.isfile(file_name)): print "Skipping dano.mtz test: input file not available" |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:11
|
Update of /cvsroot/cctbx/iotbx/iotbx/kriber In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23122/iotbx/kriber Modified Files: tst_strudat.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: tst_strudat.py =================================================================== RCS file: /cvsroot/cctbx/iotbx/iotbx/kriber/tst_strudat.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tst_strudat.py 22 Jan 2005 14:18:25 -0000 1.6 --- tst_strudat.py 20 Feb 2005 04:10:56 -0000 1.7 *************** *** 4,7 **** --- 4,8 ---- from cctbx import uctbx from cctbx.array_family import flex + import libtbx.env from cStringIO import StringIO import sys, os *************** *** 130,135 **** def exercise_zeolite_atlas(distance_cutoff=3.5): ! atlas_file = os.path.join(os.environ["LIBTBX_DIST_ROOT"], ! "regression", "misc", "strudat_zeolite_atlas") if (not os.path.isfile(atlas_file)): print "Skipping exercise_zeolite_atlas(): input file not available" --- 131,136 ---- def exercise_zeolite_atlas(distance_cutoff=3.5): ! atlas_file = libtbx.env.under_dist_root( ! "regression/misc/strudat_zeolite_atlas") if (not os.path.isfile(atlas_file)): print "Skipping exercise_zeolite_atlas(): input file not available" |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:10
|
Update of /cvsroot/cctbx/iotbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23122 Modified Files: run_tests.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: run_tests.py =================================================================== RCS file: /cvsroot/cctbx/iotbx/run_tests.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** run_tests.py 13 Jan 2005 19:41:05 -0000 1.21 --- run_tests.py 20 Feb 2005 04:10:55 -0000 1.22 *************** *** 1,4 **** - import os, os.path from libtbx import test_utils def run(): --- 1,4 ---- from libtbx import test_utils + import libtbx.env def run(): *************** *** 21,26 **** ) ! build_dir = os.path.join(os.environ["LIBTBX_BUILD"], "iotbx") ! dist_dir = os.environ["IOTBX_DIST"] test_utils.run_tests(build_dir, dist_dir, tst_list) --- 21,26 ---- ) ! build_dir = libtbx.env.under_build("iotbx") ! dist_dir = libtbx.env.dist_path("iotbx") test_utils.run_tests(build_dir, dist_dir, tst_list) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:01
|
Update of /cvsroot/cctbx/cctbx/cctbx/regression In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23020/cctbx/regression Modified Files: tst_coordination_sequences.py tst_pair_asu_table.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: tst_coordination_sequences.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/regression/tst_coordination_sequences.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tst_coordination_sequences.py 4 Feb 2005 02:57:56 -0000 1.10 --- tst_coordination_sequences.py 20 Feb 2005 04:10:44 -0000 1.11 *************** *** 4,7 **** --- 4,8 ---- from cctbx import xray from iotbx.option_parser import iotbx_option_parser + import libtbx.env import sys, os *************** *** 71,76 **** dest="verbose") ).process(args=args) ! atlas_file = os.path.join(os.environ["LIBTBX_DIST_ROOT"], ! "regression", "misc", "strudat_zeolite_atlas") if (not os.path.isfile(atlas_file)): print "Skipping exercise(): input file not available" --- 72,77 ---- dest="verbose") ).process(args=args) ! atlas_file = libtbx.env.under_dist_root( ! "regression/misc/strudat_zeolite_atlas") if (not os.path.isfile(atlas_file)): print "Skipping exercise(): input file not available" Index: tst_pair_asu_table.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/regression/tst_pair_asu_table.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tst_pair_asu_table.py 4 Feb 2005 02:57:56 -0000 1.6 --- tst_pair_asu_table.py 20 Feb 2005 04:10:44 -0000 1.7 *************** *** 6,9 **** --- 6,10 ---- import scitbx.math from libtbx.test_utils import approx_equal + import libtbx.env from cStringIO import StringIO import math *************** *** 200,205 **** exercise_icosahedron(verbose=verbose) default_distance_cutoff=3.5 ! regression_misc = os.path.join( ! os.environ["LIBTBX_DIST_ROOT"], "regression", "misc") file_names = [] for file_name in ["strudat_zeolite_atlas", "strudat_special_bonds"]: --- 201,205 ---- exercise_icosahedron(verbose=verbose) default_distance_cutoff=3.5 ! regression_misc = libtbx.env.under_dist_root("regression/misc") file_names = [] for file_name in ["strudat_zeolite_atlas", "strudat_special_bonds"]: |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:01
|
Update of /cvsroot/cctbx/cctbx/cctbx/source_generators/eltbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23020/cctbx/source_generators/eltbx Modified Files: generate_henke_cpp.py generate_sasaki_cpp.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: generate_sasaki_cpp.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/source_generators/eltbx/generate_sasaki_cpp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** generate_sasaki_cpp.py 14 Nov 2003 16:55:24 -0000 1.3 --- generate_sasaki_cpp.py 20 Feb 2005 04:10:44 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- from scitbx.source_generators.utils import join_open from scitbx.source_generators.utils import write_this_is_auto_generated + import libtbx.env import string import sys, os *************** *** 268,272 **** def run(target_dir): ! cctbx_dist = os.environ["CCTBX_DIST"] f = join_open(cctbx_dist, "reference/sasaki/fpwide.tbl", "r") tables_wide = collect_tables(f, 0) --- 269,273 ---- def run(target_dir): ! cctbx_dist = libtbx.env.dist_path("cctbx") f = join_open(cctbx_dist, "reference/sasaki/fpwide.tbl", "r") tables_wide = collect_tables(f, 0) Index: generate_henke_cpp.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/source_generators/eltbx/generate_henke_cpp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** generate_henke_cpp.py 14 Nov 2003 16:55:24 -0000 1.3 --- generate_henke_cpp.py 20 Feb 2005 04:10:44 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- from scitbx.source_generators.utils import norm_join, join_open from scitbx.source_generators.utils import write_this_is_auto_generated + import libtbx.env import string import sys, os *************** *** 39,43 **** def collect_tables(): ! cctbx_dist = os.environ["CCTBX_DIST"] henke_tables_dir = norm_join(cctbx_dist, "reference/henke/tables") nff_files = [] --- 40,44 ---- def collect_tables(): ! cctbx_dist = libtbx.env.dist_path("cctbx") henke_tables_dir = norm_join(cctbx_dist, "reference/henke/tables") nff_files = [] |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:11:01
|
Update of /cvsroot/cctbx/cctbx/include/cctbx/adp_restraints In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23020/include/cctbx/adp_restraints Modified Files: tst_ext.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: tst_ext.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/include/cctbx/adp_restraints/tst_ext.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tst_ext.py 22 Jan 2005 13:35:01 -0000 1.4 --- tst_ext.py 20 Feb 2005 04:10:44 -0000 1.5 *************** *** 3,6 **** --- 3,7 ---- from cctbx.array_family import flex from cctbx import adp_restraints + import libtbx.env import math, os *************** *** 69,73 **** System for Windows) """ ! ins_file = os.path.expandvars('$LIBTBX_DIST_ROOT/regression/pdb/enk_11i.res') if (not os.path.isfile(ins_file)): print "Skipping exercise_rigid_bond_test(): input file not available" --- 70,74 ---- System for Windows) """ ! ins_file = libtbx.env.under_dist_root("regression/pdb/enk_11i.res") if (not os.path.isfile(ins_file)): print "Skipping exercise_rigid_bond_test(): input file not available" |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:59
|
Update of /cvsroot/cctbx/cctbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23020 Modified Files: SConscript run_examples.py run_tests.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: run_examples.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/run_examples.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** run_examples.py 19 Dec 2003 06:00:50 -0000 1.6 --- run_examples.py 20 Feb 2005 04:10:43 -0000 1.7 *************** *** 1,4 **** - import os, os.path from libtbx import test_utils def run(): --- 1,4 ---- from libtbx import test_utils + import libtbx.env def run(): *************** *** 12,17 **** ) ! build_dir = os.path.join(os.environ["LIBTBX_BUILD"], "cctbx") ! dist_dir = os.environ["CCTBX_DIST"] test_utils.run_tests(build_dir, dist_dir, tst_list) --- 12,17 ---- ) ! build_dir = libtbx.env.under_build("cctbx") ! dist_dir = libtbx.env.dist_path("cctbx") test_utils.run_tests(build_dir, dist_dir, tst_list) Index: SConscript =================================================================== RCS file: /cvsroot/cctbx/cctbx/SConscript,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** SConscript 1 Oct 2004 22:03:34 -0000 1.21 --- SConscript 20 Feb 2005 04:10:43 -0000 1.22 *************** *** 1,6 **** - import os Import("env_base", "env_etc") ! env_etc.cctbx_dist = os.environ["CCTBX_DIST"] env_etc.cctbx_include = env_etc.norm_join(env_etc.cctbx_dist, "include") env_etc.cctbx_common_includes = [ --- 1,5 ---- Import("env_base", "env_etc") ! env_etc.cctbx_dist = env_etc.libtbx_env.dist_path("cctbx") env_etc.cctbx_include = env_etc.norm_join(env_etc.cctbx_dist, "include") env_etc.cctbx_common_includes = [ Index: run_tests.py =================================================================== RCS file: /cvsroot/cctbx/cctbx/run_tests.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** run_tests.py 22 Dec 2004 00:24:40 -0000 1.41 --- run_tests.py 20 Feb 2005 04:10:43 -0000 1.42 *************** *** 1,4 **** - import os, os.path from libtbx import test_utils def run(): --- 1,4 ---- from libtbx import test_utils + import libtbx.env def run(): *************** *** 66,71 **** ) ! build_dir = os.path.join(os.environ["LIBTBX_BUILD"], "cctbx") ! dist_dir = os.environ["CCTBX_DIST"] test_utils.run_tests(build_dir, dist_dir, tst_list) --- 66,71 ---- ) ! build_dir = libtbx.env.under_build("cctbx") ! dist_dir = libtbx.env.dist_path("cctbx") test_utils.run_tests(build_dir, dist_dir, tst_list) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:59
|
Update of /cvsroot/cctbx/cctbx/cctbx/command_line In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23020/cctbx/command_line Modified Files: web.install.csh Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: web.install.csh =================================================================== RCS file: /cvsroot/cctbx/cctbx/cctbx/command_line/web.install.csh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** web.install.csh 16 Dec 2004 23:03:53 -0000 1.6 --- web.install.csh 20 Feb 2005 04:10:43 -0000 1.7 *************** *** 1,4 **** --- 1,5 ---- #! /bin/csh -f + source "`libtbx.show_build_path`/setpaths.csh" set echo |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:43
|
Update of /cvsroot/cctbx/scitbx/array_family/boost_python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22956/array_family/boost_python Modified Files: regression_test.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: regression_test.py =================================================================== RCS file: /cvsroot/cctbx/scitbx/array_family/boost_python/regression_test.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** regression_test.py 7 Aug 2003 02:15:48 -0000 1.10 --- regression_test.py 20 Feb 2005 04:10:34 -0000 1.11 *************** *** 1,9 **** from scitbx.array_family import flex def extend_sys_path(): ! import sys, os.path ! libtbx_build = os.environ["LIBTBX_BUILD"] ! sys.path.insert(0, os.path.normpath(os.path.join(libtbx_build, ! "scitbx/array_family/boost_python"))) def exercise_std_vector_conversions(verbose=0): --- 1,9 ---- from scitbx.array_family import flex + import libtbx.env + import sys def extend_sys_path(): ! sys.path.insert(0, ! libtbx.env.under_build("scitbx/array_family/boost_python")) def exercise_std_vector_conversions(verbose=0): |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:43
|
Update of /cvsroot/cctbx/scitbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22956 Modified Files: SConscript run_tests.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: SConscript =================================================================== RCS file: /cvsroot/cctbx/scitbx/SConscript,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** SConscript 5 Jul 2004 07:16:43 -0000 1.23 --- SConscript 20 Feb 2005 04:10:34 -0000 1.24 *************** *** 1,6 **** - import os Import("env_etc") ! env_etc.scitbx_dist = os.environ["SCITBX_DIST"] env_etc.scitbx_include = env_etc.norm_join(env_etc.scitbx_dist, "include") env_etc.scitbx_common_includes = [ --- 1,5 ---- Import("env_etc") ! env_etc.scitbx_dist = env_etc.libtbx_env.dist_path("scitbx") env_etc.scitbx_include = env_etc.norm_join(env_etc.scitbx_dist, "include") env_etc.scitbx_common_includes = [ Index: run_tests.py =================================================================== RCS file: /cvsroot/cctbx/scitbx/run_tests.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** run_tests.py 25 Jan 2005 01:34:05 -0000 1.24 --- run_tests.py 20 Feb 2005 04:10:34 -0000 1.25 *************** *** 1,4 **** - import os, os.path from libtbx import test_utils def run(): --- 1,4 ---- from libtbx import test_utils + import libtbx.env def run(): *************** *** 30,35 **** ) ! build_dir = os.path.join(os.environ["LIBTBX_BUILD"], "scitbx") ! dist_dir = os.environ["SCITBX_DIST"] test_utils.run_tests(build_dir, dist_dir, tst_list) --- 30,35 ---- ) ! build_dir = libtbx.env.under_build("scitbx") ! dist_dir = libtbx.env.dist_path("scitbx") test_utils.run_tests(build_dir, dist_dir, tst_list) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:32
|
Update of /cvsroot/cctbx/boost_adaptbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22881 Modified Files: SConscript run_tests.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: SConscript =================================================================== RCS file: /cvsroot/cctbx/boost_adaptbx/SConscript,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** SConscript 16 Feb 2005 08:32:28 -0000 1.33 --- SConscript 20 Feb 2005 04:10:24 -0000 1.34 *************** *** 206,209 **** --- 206,211 ---- source=["#boost/libs/python/test/%s.cpp" % s for s in src.split(";")], ) + test_dir = os.path.normpath(os.path.join( + env_etc.boost_dist, "libs/python/test")) if (sys.platform == "win32"): boost_python_run_tests = \ *************** *** 211,215 **** f = open(boost_python_run_tests, "w") for tst in all_tst: ! print >> f, "call python %%BOOST_DIST%%/libs/python/test/%s.py" % tst f.close() else: --- 213,217 ---- f = open(boost_python_run_tests, "w") for tst in all_tst: ! print >> f, 'call python "%s"' % (os.path.join(test_dir, tst+".py")) f.close() else: *************** *** 220,224 **** print >> f, "set verbose" for tst in all_tst: ! print >> f, "python $BOOST_DIST/libs/python/test/%s.py" % tst f.close() os.chmod(boost_python_run_tests, 0755) --- 222,226 ---- print >> f, "set verbose" for tst in all_tst: ! print >> f, 'python "%s"' % (os.path.join(test_dir, tst+".py")) f.close() os.chmod(boost_python_run_tests, 0755) Index: run_tests.py =================================================================== RCS file: /cvsroot/cctbx/boost_adaptbx/run_tests.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** run_tests.py 19 Dec 2003 05:58:31 -0000 1.1 --- run_tests.py 20 Feb 2005 04:10:24 -0000 1.2 *************** *** 1,4 **** from libtbx import test_utils ! import os def run(): --- 1,4 ---- from libtbx import test_utils ! import libtbx.env def run(): *************** *** 7,12 **** ) ! build_dir = os.path.join(os.environ["LIBTBX_BUILD"], "boost_adaptbx") ! dist_dir = os.environ["BOOST_ADAPTBX_DIST"] test_utils.run_tests(build_dir, dist_dir, tst_list) --- 7,12 ---- ) ! build_dir = libtbx.env.under_build("boost_adaptbx") ! dist_dir = libtbx.env.dist_path("boost_adaptbx") test_utils.run_tests(build_dir, dist_dir, tst_list) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:07
|
Update of /cvsroot/cctbx/libtbx/libtbx/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22638/libtbx/server Modified Files: FileClient.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: FileClient.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/server/FileClient.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileClient.py 21 Jan 2005 19:38:55 -0000 1.5 --- FileClient.py 20 Feb 2005 04:09:53 -0000 1.6 *************** *** 176,181 **** import FileServer import time ! cmd = os.path.expandvars('$LIBTBX_DIST/libtbx/server/StartServer.py') python_path = sys.executable --- 176,182 ---- import FileServer import time + import libtbx.env ! cmd = libtbx.env.under_dist("libtbx", "libtbx/server/StartServer.py") python_path = sys.executable |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:06
|
Update of /cvsroot/cctbx/libtbx/libtbx/command_line In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22638/libtbx/command_line Modified Files: configure.py refresh.py scons.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: scons.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/scons.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** scons.py 11 Dec 2004 01:12:50 -0000 1.3 --- scons.py 20 Feb 2005 04:09:53 -0000 1.4 *************** *** 1,8 **** import sys, os ! dist_root = os.environ["LIBTBX_DIST_ROOT"] ! engine = os.path.normpath(os.path.join(dist_root, "scons/engine")) if (not os.path.isdir(engine)): ! engine = os.path.normpath(os.path.join(dist_root, "scons/src/engine")) sys.path.insert(0, engine) try: import SCons --- 1,8 ---- + import libtbx.env import sys, os ! engine = libtbx.env.under_dist_root("scons/engine") if (not os.path.isdir(engine)): ! engine = libtbx.env.under_dist_root("scons/src/engine") sys.path.insert(0, engine) try: import SCons Index: refresh.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/refresh.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** refresh.py 20 Oct 2004 06:50:33 -0000 1.23 --- refresh.py 20 Feb 2005 04:09:53 -0000 1.24 *************** *** 201,204 **** --- 201,213 ---- action(python_exe, target_file) + def create_show_build_path(libtbx_env, target_dir): + target_file = os.path.join(target_dir, "libtbx.show_build_path") + f = open(target_file, "w") + print >> f, '#! /bin/sh' + print >> f, '# LIBTBX_DISPATCHER DO NOT EDIT' + print >> f, 'echo "%s"' % libtbx_env.LIBTBX_BUILD + f.close() + os.chmod(target_file, 0755) + def run(): libtbx_env = libtbx.config.env() *************** *** 229,232 **** --- 238,243 ---- libtbx_env=libtbx_env, dispatcher_dict=dispatcher_dict) + else: + create_show_build_path(libtbx_env=libtbx_env, target_dir=target_dir) if (__name__ == "__main__"): Index: configure.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/command_line/configure.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** configure.py 22 Jan 2005 15:48:15 -0000 1.49 --- configure.py 20 Feb 2005 04:09:53 -0000 1.50 *************** *** 229,232 **** --- 229,236 ---- print >> f, ' echo "Please re-run the libtbx/configure.py command."' print >> f, ' echo ""' + if (f is s): + print >> f, 'else if ($#argv != 0 && $#argv != 1'\ + ' || $#argv && "$1" != "minimal") then' + print >> f, ' echo "usage: source $0 [minimal]"' print >> f, 'else' for var_name, values in env.items(): *************** *** 244,248 **** print >> u, ' unsetenv LIBTBX0%s' % var_name else: ! print >> s, ' setenv %s "%s"' % (var_name, values) print >> u, ' unsetenv %s' % var_name for f in s, u: --- 248,257 ---- print >> u, ' unsetenv LIBTBX0%s' % var_name else: ! if ( var_name.endswith("_DIST") ! or var_name.endswith("_DIST_ROOT")): ! condition = "if ($#argv == 0) " ! else: ! condition = "" ! print >> s, ' %ssetenv %s "%s"' % (condition, var_name, values) print >> u, ' unsetenv %s' % var_name for f in s, u: |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:05
|
Update of /cvsroot/cctbx/libtbx/libtbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22638/libtbx Modified Files: config.py optparse_wrapper.py Added Files: env.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: optparse_wrapper.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/optparse_wrapper.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** optparse_wrapper.py 13 Jan 2005 19:24:32 -0000 1.2 --- optparse_wrapper.py 20 Feb 2005 04:09:53 -0000 1.3 *************** *** 2,10 **** # mv lib optik import sys, os ! if (sys.version_info[0] < 3 or sys.version_info[1] < 3): ! sys.path.insert(0, os.path.join(os.environ["LIBTBX_DIST"], "optik141")) from optik import * else: from optparse import * class option_parser(OptionParser): --- 2,14 ---- # mv lib optik import sys, os ! if (sys.version_info[0] < 3 and sys.version_info[1] < 3): ! import libtbx.config ! sys.path.insert(0, os.path.join( ! libtbx.config.env().dist_path("libtbx"), ! "optik141")) from optik import * else: from optparse import * + from optparse import make_option class option_parser(OptionParser): Index: config.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/libtbx/config.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** config.py 19 Feb 2005 01:50:13 -0000 1.25 --- config.py 20 Feb 2005 04:09:53 -0000 1.26 *************** *** 117,121 **** def __init__(self, application_prefix="LIBTBX"): self.application_prefix = application_prefix ! libtbx_build = os.environ["LIBTBX_BUILD"] file_name = join(libtbx_build, "libtbx_env") try: --- 117,121 ---- def __init__(self, application_prefix="LIBTBX"): self.application_prefix = application_prefix ! libtbx_build = os.environ["LIBTBX_BUILD"] # XXX XXX XXX XXX XXX XXX XXX XXX file_name = join(libtbx_build, "libtbx_env") try: --- NEW FILE: env.py --- import libtbx.config import os env_cache = libtbx.config.env() dist_root = env_cache.LIBTBX_DIST_ROOT dist_path = env_cache.dist_path build = env_cache.LIBTBX_BUILD def under_dist_root(path): return os.path.normpath(os.path.join(dist_root, path)) def under_dist(package_name, path): return os.path.normpath(os.path.join( dist_path(package_name=package_name), path)) def under_build(path): return os.path.normpath(os.path.join(build, path)) |
|
From: Ralf W. Grosse-K. <rw...@us...> - 2005-02-20 04:10:01
|
Update of /cvsroot/cctbx/libtbx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22638 Modified Files: run_tests.py Log Message: eliminaton of os.environ["*_DIST"] and os.path.expandvars("*_DIST/*") from SConscripts and regresstion tests Index: run_tests.py =================================================================== RCS file: /cvsroot/cctbx/libtbx/run_tests.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** run_tests.py 13 Jan 2005 19:23:52 -0000 1.2 --- run_tests.py 20 Feb 2005 04:09:36 -0000 1.3 *************** *** 1,4 **** from libtbx import test_utils ! import os, os.path def run(): --- 1,4 ---- from libtbx import test_utils ! import libtbx.env def run(): *************** *** 10,14 **** build_dir = None ! dist_dir = os.environ["LIBTBX_DIST"] test_utils.run_tests(build_dir, dist_dir, tst_list) --- 10,14 ---- build_dir = None ! dist_dir = libtbx.env.dist_path("libtbx") test_utils.run_tests(build_dir, dist_dir, tst_list) |