def run(self): # Do the standard installation. base.run(self) config_file = os.path.join(self.install_dir, 'Synopsis', 'config.py') self.announce("adjusting config parameters") i = self.distribution.get_command_obj('install') version = self.distribution.get_version() datadir=os.path.join(i.prefix, 'share', 'synopsis-%s'%version) reset_config_variables(config_file, prefix=i.prefix, version=version, revision=self.distribution.revision, datadir=datadir) # Make sure the new config file gets recompiled, or else python may # not notice it is in fact different from the original config file. files = [config_file] from distutils.util import byte_compile install_root = self.get_finalized_command('install').root if self.compile: byte_compile(files, optimize=0, force=1, prefix=install_root, dry_run=self.dry_run) if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=1, prefix=install_root, verbose=self.verbose, dry_run=self.dry_run)
def run(self): # Save any existing 'bin' subdirectory: if os.path.exists(self.install_dir): bin_savedir = weeutil.weeutil.move_with_timestamp(self.install_dir) print("Saved bin subdirectory as %s" % bin_savedir) else: bin_savedir = None # Run the superclass's version. This will install all incoming files. install_lib.run(self) # If the bin subdirectory previously existed, and if it included # a 'user' subsubdirectory, then restore it if bin_savedir: user_backupdir = os.path.join(bin_savedir, 'user') if os.path.exists(user_backupdir): user_dir = os.path.join(self.install_dir, 'user') distutils.dir_util.copy_tree(user_backupdir, user_dir) try: # The file schemas.py is no longer used, and can interfere with schema # imports. See issue #54. os.rename(os.path.join(user_dir, 'schemas.py'), os.path.join(user_dir, 'schemas.py.old')) except OSError: pass try: os.remove(os.path.join(user_dir, 'schemas.pyc')) except OSError: pass
def run(self): # Do the standard installation. base.run(self) config_file = join(self.install_dir, 'qm', 'config.py') self.announce("adjusting config parameters") i = self.distribution.get_command_obj('install') prefix = i.prefix extension_path = join('share', 'qmtest', 'site-extensions-%d.%d'%sys.version_info[:2]) reset_config_variables(config_file, version=self.distribution.get_version(), prefix=prefix, extension_path=extension_path) # Make sure the new config file gets recompiled, or else python may # not notice it is in fact different from the original config file. files = [config_file] from distutils.util import byte_compile install_root = self.get_finalized_command('install').root if self.compile: byte_compile(files, optimize=0, force=1, prefix=install_root, dry_run=self.dry_run) if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=1, prefix=install_root, verbose=self.verbose, dry_run=self.dry_run)
def run(self): print("P4_install_lib()") print("self.install_dir = %s" % self.install_dir) instFile = file(instFileName, 'w') instFile.write("p4LibDir = '%s'\n" % os.path.join(self.install_dir, 'p4')) instFile.close() install_lib.run(self)
def run(self): if os.path.exists(self.install_dir): bin_backupdir = backup(self.install_dir) print "Backed up bin subdirectory to %s" % bin_backupdir # Run the superclass's version: install_lib.run(self)
def run(self): # Determine whether the user is still using an old-style schema schema_type = get_schema_type(self.install_dir) # Save any existing 'bin' subdirectory: if os.path.exists(self.install_dir): bin_savedir = weeutil.weeutil.move_with_timestamp(self.install_dir) print "Saved bin subdirectory as %s" % bin_savedir else: bin_savedir = None # Run the superclass's version. This will install all incoming files. install_lib.run(self) # If the bin subdirectory previously existed, and if it included # a 'user' subsubdirectory, then restore it if bin_savedir: user_backupdir = os.path.join(bin_savedir, 'user') if os.path.exists(user_backupdir): user_dir = os.path.join(self.install_dir, 'user') distutils.dir_util.copy_tree(user_backupdir, user_dir) # But, there is one exception: if the old user subdirectory included an # old-style schema, then it should be overwritten with the new version. if schema_type == 'old': incoming_schema_path = os.path.join(bin_dir, 'user/schemas.py') target_path = os.path.join(self.install_dir, 'user/schemas.py') distutils.file_util.copy_file(incoming_schema_path, target_path)
def run(self): # Determine whether the user is still using an old-style schema schema_type = get_schema_type(self.install_dir) # Save any existing 'bin' subdirectory: if os.path.exists(self.install_dir): bin_savedir = weeutil.weeutil.move_with_timestamp(self.install_dir) print "Saved bin subdirectory as %s" % bin_savedir else: bin_savedir = None # Run the superclass's version. This will install all incoming files. install_lib.run(self) # If the bin subdirectory previously existed, and if it included # a 'user' subsubdirectory, then restore it if bin_savedir: user_backupdir = os.path.join(bin_savedir, 'user') if os.path.exists(user_backupdir): user_dir = os.path.join(self.install_dir, 'user') distutils.dir_util.copy_tree(user_backupdir, user_dir) # But, there is one exception: if the old user subdirectory included an # old-style schema, then it should be overwritten with the new version. if schema_type == 'old': incoming_schema_path = os.path.join(bin_dir, 'user/schemas.py') target_path = os.path.join(self.install_dir, 'user/schemas.py') distutils.file_util.copy_file(incoming_schema_path, target_path)
def run (self): ''' Also install shared libraries and executables ''' old_install_lib.run(self) lib = 'lib' if struct.calcsize('P') == 8: lib = 'lib64' build = self.get_finalized_command('build') build_shlib = self.get_finalized_command('build_shlib') install = self.get_finalized_command('install') self.verbose = options.DEBUG if install.prefix is None: target_dir = os.path.join(install.install_base, lib) else: target_dir = os.path.join(install.prefix, lib) mkdir(target_dir) if build_shlib.install_shared_libraries: for lib in build_shlib.install_shared_libraries: target = target_dir + os.sep source = os.path.join(build_shlib.build_clib, lib[1]) self.copy_file(source, target) if self.distribution.extra_install_modules: ## prefer updated packages local_pkgs_dir = os.path.join(build.build_base, options.local_lib_dir) insertions = 0 if os.path.exists(local_pkgs_dir): sys.path.insert(0, os.path.abspath(local_pkgs_dir)) insertions += 1 for ent in os.listdir(os.path.abspath(local_pkgs_dir)): if os.path.isdir(os.path.join(local_pkgs_dir, ent)) and \ ent[-4:] == '.egg': pth = os.path.join(local_pkgs_dir, ent) sys.path.insert(0, os.path.abspath(pth)) insertions += 1 module_dir = install.install_platlib for mod in self.distribution.extra_install_modules: if mod in EXCEPTIONS: continue source = get_module_location(mod, local_pkgs_dir) if os.path.isdir(source): self.copy_tree(source, os.path.join(module_dir, mod)) else: self.copy_file(source, module_dir) for _ in range(insertions): sys.path.pop(0) if self.distribution.extra_install_libraries: for pkg_tpl in self.distribution.extra_install_libraries: for lib_tpl in pkg_tpl[1]: libpath = lib_tpl[0] for libname in lib_tpl[1]: for source in glob.glob(os.path.join(libpath, libname + '*')): self.copy_file(source, target_dir)
def run(self): install_lib.run(self) # super.run() if os.name != 'posix': return launch = os.path.join(self.install_dir, 'zeroinstall/0launch-gui/0launch-gui') os.chmod(launch, os.stat(launch).st_mode | 0o111)
def run(self): install_lib.run(self) for fn in self.get_outputs(): for e in self.executables: if fnmatch.fnmatch(fn, e): mode = ((os.stat(fn).st_mode) | 0o0555) & 0o07777 info("changing mode of %s to %o", fn, mode) os.chmod(fn, mode)
def run(self): for initfile in [ "virtinst/__init__.py", "virtconv/__init__.py" ]: cmd = "cat %s | " % initfile cmd += """sed -e "s,::LOCALEDIR::,%s," > """ % locale cmd += "%s/%s" % (builddir, initfile) os.system(cmd) _install_lib.run(self)
def run(self): print("P4_install_lib()") print("self.install_dir = %s" % self.install_dir) instFile = file(instFileName, 'w') instFile.write("p4LibDir = '%s'\n" % os.path.join(self.install_dir, 'p4')) instFile.close() install_lib.run(self)
def run(self): # Call parent install_lib.run(self) # Execute commands #import pdb; pdb.set_trace() print "Would build parser tables" self.execute(self.build_tables, [])
def run(self): # Call parent install_lib.run(self) # Execute commands #import pdb; pdb.set_trace() print "Would build parser tables" self.execute(self.build_tables, [])
def run(self): script_executable = os.path.join(self.install_dir, "src", "tools", "run_script.sh") install_lib.run(self) for filename in self.get_outputs(): if filename == script_executable: mode = ((os.stat(filename).st_mode) | 0o555) & 0o7777 os.chmod(filename, mode)
def run(self): script_executable = os.path.join(self.install_dir, "src", "tools", "run_script.sh") install_lib.run(self) for filename in self.get_outputs(): if filename == script_executable: mode = ((os.stat(filename).st_mode) | 0o555) & 0o7777 os.chmod(filename, mode)
def run(self): target_path = os.path.join(self.install_dir, 'pympler') try: rmtree(target_path) print ("purging %s" % target_path) except OSError: pass install_lib.run(self)
def run(self): target_path = os.path.join(self.install_dir, 'pympler') try: rmtree(target_path) print("purging %s" % target_path) except OSError: pass install_lib.run(self)
def run(self): from distutils.sysconfig import get_python_lib import os ## Also include a hack to install in the correct directory if necessary if not os.access(self.install_dir, os.W_OK): if ('--user' in argv): import site self.install_dir = site.USER_SITE else: self.install_dir = get_python_lib() _install_lib.run(self)
def run(self): try: import Crypto if Crypto.version_info < (2,1): print('\n**** WARNING: ****\nYou seem to have pyCrypto < 2.1 ' 'installed. python-potr will need at least pyCrypto 2.1 to run\n\n') except: print('\n**** WARNING: ****\nYou don\'t seem to have pyCrypto ' 'installed. python-potr will need at least pyCrypto 2.1 to run\n\n') install_lib.run(self)
def run(self): from distutils.sysconfig import get_python_lib import os ## Also include a hack to install in the correct directory if necessary if not os.access(self.install_dir, os.W_OK): if('--user' in argv): import site self.install_dir = site.USER_SITE else: self.install_dir = get_python_lib() _install_lib.run(self)
def run(self): """ checks for a valid pycrypto version before running the install process, prints a warning if none was found """ try: import Crypto if Crypto.version_info < (2,1): print('\n**** WARNING: ****\nYou seem to have pyCrypto < 2.1 ' 'installed. python-potr will need at least pyCrypto 2.1 to run\n\n') except: print('\n**** WARNING: ****\nYou don\'t seem to have pyCrypto ' 'installed. python-potr will need at least pyCrypto 2.1 to run\n\n') install_lib.run(self)
def run(self): install_lib.run(self) # input and outputs match 1-1 inp = self.get_inputs() out = self.get_outputs() #idx = inp.index('build/lib/salt/templates/git/ssh-id-wrapper') for i, word in enumerate(inp): if word.endswith('salt/templates/git/ssh-id-wrapper'): idx = i filename = out[idx] os.chmod(filename, 0755)
def run(self): # Get installation prefix root = self.distribution.get_command_obj('install').root prefix = self.distribution.get_command_obj('install').install_data if root and prefix: prefix = os.path.abspath(prefix).replace(os.path.abspath(root), '') # Update paths pathfile = os.path.join(self.build_dir, __cmdname__, 'path.py') # Load file data fd = open(pathfile, 'r') data = fd.read() # Replace paths print("updating '%s' paths" % pathfile) data = data.replace( 'DATA_DIR = get_source_directory()', 'DATA_DIR = %s' % repr(os.path.join(prefix, 'share', __cmdname__)), ) data = data.replace( "LOCALE_DIR = get_source_directory('locale')", 'LOCALE_DIR = %s' % repr(os.path.join(prefix, 'share', 'locale')), ) # Write modifications and close file fd = open(pathfile, 'w') fd.write(data) fd.close() # Continue with distutils built-in install_lib command return _install_lib.run(self)
def run(self): dftinstall_lib.run(self) # Set the executable bits (owner, group, and world) on # all executable_data exe_ouput = [ os.path.join(self.install_dir, f) for f in executable_data ] if os.name == 'posix': for fn in self.get_outputs(): if fn in exe_ouput: if self.dry_run: log.info("changing mode of %s", fn) else: mode = ((os.stat(fn).st_mode) | 0555) & 07777 log.info("changing mode of %s to %o", fn, mode) os.chmod(fn, mode)
def run(self): install_lib.run(self) package_location = os.path.join(self.install_dir, "account_tools") print "Copying account_tools settings file" destination = os.path.join(package_location, "settings.py") print "Copying to %s" % destination shutil.copy(SETTINGS_SECRET_FILE, destination) print "Changing owner to account-tools:account-tools" chown_cmd = "chown -R account-tools:account-tools %s" % package_location subprocess.call(shlex.split(chown_cmd)) print "Chmod go-rwx" chmod_cmd = "chmod -R go-rwx %s" % package_location subprocess.call(shlex.split(chmod_cmd))
def run(self): # Location of the user subdirectory, if it exists. user_dir = os.path.join(self.install_dir, 'user') if os.path.exists(user_dir): # It exists. Save it under a timestamp user_savedir = move_with_timestamp(user_dir) else: user_savedir = None # Run the superclass's version. This will install all incoming files, including # a new user subdirectory rv = install_lib.run(self) # If we set aside an old user subdirectory, restore it if user_savedir: # Remove the user directory we just installed... distutils.dir_util.remove_tree(user_dir) # ... then move the saved version back: shutil.move(user_savedir, user_dir) try: # The file schemas.py is no longer used, and can interfere with schema # imports. See issue #54. os.rename(os.path.join(user_dir, 'schemas.py'), os.path.join(user_dir, 'schemas.py.old')) except OSError: pass try: os.remove(os.path.join(user_dir, 'schemas.pyc')) except OSError: pass return rv
def run(self): self.run_command('install_patchelf') # We already cleaned the build dir, but we want to re-clean it now that # we're about to install the python package. Otherwise, the build dir # gets installed too! self.reinitialize_command('clean_patchelf') self.run_command('clean_patchelf') return OrigInstallLibCommand.run(self)
def run(self): install_lib.run(self) if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') libs = build_clib.get_library_names() clib_dir = build_clib.build_clib for lib in libs: clib = 'lib' + lib + '.a' src_file = os.path.join(clib_dir, clib) dest_file = os.path.join(self.install_dir, clib) copy_file(src_file, dest_file) if sys.platform[:6] == "darwin": spawn(['ranlib'] + [dest_file])
def run(self): self.run_command('install_patchelf') # We already cleaned the build dir, but we want to re-clean it now that # we're about to install the python package. Otherwise, the build dir # gets installed too! self.reinitialize_command('clean_patchelf') self.run_command('clean_patchelf') return OrigInstallLibCommand.run(self)
def run(self): executables = [ 'salt/templates/git/ssh-id-wrapper', 'salt/templates/lxc/salt_tarball', ] install_lib.run(self) # input and outputs match 1-1 inp = self.get_inputs() out = self.get_outputs() chmod = [] for idx, inputfile in enumerate(inp): for executeable in executables: if inputfile.endswith(executeable): chmod.append(idx) for idx in chmod: filename = out[idx] os.chmod(filename, 0755)
def run(self): executables = [ 'salt/templates/git/ssh-id-wrapper', 'salt/templates/lxc/salt_tarball', ] install_lib.run(self) # input and outputs match 1-1 inp = self.get_inputs() out = self.get_outputs() chmod = [] for idx, inputfile in enumerate(inp): for executeable in executables: if inputfile.endswith(executeable): chmod.append(idx) for idx in chmod: filename = out[idx] os.chmod(filename, 0o755)
def run(self): install_lib.run(self) if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') libs = build_clib.get_library_names() clib_dir = build_clib.build_clib for lib in libs: clib = 'lib' + lib + '.a' src_file = os.path.join(clib_dir, clib) dest_file = os.path.join(self.install_dir, clib) copy_file(src_file, dest_file) if sys.platform[:6] == "darwin": spawn(['ranlib'] + [dest_file])
def run(self): realcopyfile = file_util.copy_file def copyfileandsetmode(*args, **kwargs): src, dst = args[0], args[1] dst, copied = realcopyfile(*args, **kwargs) if copied: st = os.stat(src) # Persist executable bit (apply it to group and other if user # has it) if st[stat.ST_MODE] & stat.S_IXUSR: setmode = 0755 else: setmode = 0644 os.chmod(dst, (stat.S_IMODE(st[stat.ST_MODE]) & ~0777) | setmode) file_util.copy_file = copyfileandsetmode try: install_lib.run(self) finally: file_util.copy_file = realcopyfile
def run(self): """Specialized version of run that saves, then restores, the 'user' subdirectory.""" # Save any existing 'user' subdirectory: user_dir = os.path.join(self.install_dir, 'user') if not self.dry_run and os.path.exists(user_dir): user_backup_dir = user_dir + ".bak" shutil.move(user_dir, user_backup_dir) else: user_backup_dir = None # Run the superclass's version. This will install a new 'user' subdirectory. install_lib.run(self) # Restore the 'user' subdirectory if user_backup_dir: # Delete the freshly installed user subdirectory shutil.rmtree(user_dir) # Replace it with our saved version. shutil.move(user_backup_dir, user_dir)
def run(self): # run default handler install_lib.run(self) # locating destination target = os.path.join(self.install_dir, 'g8storclient') link = "g8storclient.so" # detecting system type system = "x86_64" print("Installing for: %s" % system) # creating symlink to the right binary current = os.getcwd() os.chdir(target) if os.path.exists("%s/%s" % (target, link)): print("FIXME: File already exists") os.symlink("g8storclient-%s.so.py" % system, link) os.chdir(current)
def run(self): realcopyfile = file_util.copy_file def copyfileandsetmode(*args, **kwargs): src, dst = args[0], args[1] dst, copied = realcopyfile(*args, **kwargs) if copied: st = os.stat(src) # Persist executable bit (apply it to group and other if user # has it) if st[stat.ST_MODE] & stat.S_IXUSR: setmode = int('0755', 8) else: setmode = int('0644', 8) m = stat.S_IMODE(st[stat.ST_MODE]) m = (m & ~int('0777', 8)) | setmode os.chmod(dst, m) file_util.copy_file = copyfileandsetmode try: install_lib.run(self) finally: file_util.copy_file = realcopyfile
def run(self): _base.run(self) ## print out hints to set up environment variables ## this might not be necessary any more because ## in install.py we will save a sh script with ## env vars. print "* c libraries were installed into %s" % self.clib_install_dir #print "* python modules were installed into %s" % self.install_dir import os, sys if os.name == "nt": dll_ld_path = "PATH" pass elif sys.platform[:6] == "darwin": dll_ld_path = "DYLD_LIBRARY_PATH" pass else: dll_ld_path = "LD_LIBRARY_PATH" pass print "* You may need to add %s to environment variable %s."%(self.clib_install_dir, dll_ld_path) #print ">>> You may also need to change some environment variable so that compilers can find the right path to your c libraries." #print ">>> You may need to add %s to environment variable PYTHONPATH." % self.install_dir print return
def run(self): # Do the standard installation. base.run(self) config_file = join(self.install_dir, 'qm', 'config.py') self.announce("adjusting config parameters") i = self.distribution.get_command_obj('install') prefix = i.prefix extension_path = join('share', 'qmtest', 'site-extensions-%d.%d' % sys.version_info[:2]) reset_config_variables(config_file, version=self.distribution.get_version(), prefix=prefix, extension_path=extension_path) # Make sure the new config file gets recompiled, or else python may # not notice it is in fact different from the original config file. files = [config_file] from distutils.util import byte_compile install_root = self.get_finalized_command('install').root if self.compile: byte_compile(files, optimize=0, force=1, prefix=install_root, dry_run=self.dry_run) if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=1, prefix=install_root, verbose=self.verbose, dry_run=self.dry_run)
def run(self): result = install_lib.run(self) fullfname = os.path.join(self.install_dir, 'ivre', '__init__.py') tmpfname = "%s.tmp" % fullfname stat = os.stat(fullfname) os.rename(fullfname, tmpfname) with open(fullfname, 'w') as newf: with open(tmpfname) as oldf: for line in oldf: if line.startswith('import '): newf.write('VERSION = %r\n' % VERSION) break newf.write(line) os.chown(fullfname, stat.st_uid, stat.st_gid) os.chmod(fullfname, stat.st_mode) os.unlink(tmpfname) return result
def run(self): result = install_lib.run(self) fullfname = os.path.join(self.install_dir, 'ivre', '__init__.py') tmpfname = "%s.tmp" % fullfname stat = os.stat(fullfname) os.rename(fullfname, tmpfname) with open(fullfname, 'w') as newf: with open(tmpfname) as oldf: for line in oldf: if line.startswith('import '): newf.write('VERSION = %r\n' % VERSION) break newf.write(line) os.chown(fullfname, stat.st_uid, stat.st_gid) os.chmod(fullfname, stat.st_mode) os.unlink(tmpfname) return result
def run(self): # Get the follwing paths. root = getattr(self.get_finalized_command('install'), 'root') prefix = getattr(self.get_finalized_command('install'), 'prefix') libDir = getattr(self.get_finalized_command('build'), 'build_lib') # To fix the datadir location in useful.py. filename = os.path.join(libDir, 'whaawmp', 'common', 'useful.py') datadir = os.path.join(prefix, 'share', 'whaawmp') replaceStr(filename, '@datadir@', datadir) # Install the locales, first compile them, then copy them over. os.system('%s po/potool.py compile' % sys.executable) if (os.path.exists('po/locale')): distutils.dir_util.copy_tree('po/locale', ('%s%s/share/locale' % (root, prefix))) # Run the distutils install_lib function. res = install_lib.run(self) # Change the datadir in useful.py back to '@datadir@'. replaceStr(filename, datadir, '@datadir@') return res
def run(self): # Get the follwing paths. root = getattr(self.get_finalized_command('install'), 'root') prefix = getattr(self.get_finalized_command('install'), 'prefix') libDir = getattr(self.get_finalized_command('build'), 'build_lib') # To fix the datadir location in morphin.py. filename = os.path.join(libDir, 'morphin', 'morphin.py') datadir = os.path.join(prefix, 'share', 'morphin', 'data') replaceStr(filename, '@dataDir@', datadir) # To fix the gladedir location in morphin.py. filename = os.path.join(libDir, 'morphin', 'morphin.py') datadir = os.path.join(prefix, 'share', 'morphin', 'glade') replaceStr(filename, '@gladePath@', datadir) # Run the distutils install_lib function. res = install_lib.run(self) # Change the datadir in useful.py back to '@datadir@'. #replaceStr(filename, datadir, '@datadir@') return res
def run(self): # Get the follwing paths. root = getattr(self.get_finalized_command('install'), 'root') prefix = getattr(self.get_finalized_command('install'), 'prefix') libDir = getattr(self.get_finalized_command('build'), 'build_lib') # To fix the datadir location in morphin.py. filename = os.path.join(libDir, 'morphin', 'morphin.py') datadir = os.path.join(prefix, 'share', 'morphin', 'data') replaceStr(filename, '@dataDir@', datadir) # To fix the gladedir location in morphin.py. filename = os.path.join(libDir, 'morphin', 'morphin.py') datadir = os.path.join(prefix, 'share', 'morphin', 'glade') replaceStr(filename, '@gladePath@', datadir) # Run the distutils install_lib function. res = install_lib.run(self) # Change the datadir in useful.py back to '@datadir@'. #replaceStr(filename, datadir, '@datadir@') return res
def run(self): run_triggers('install_lib', 'pre', args=(self,)) install_lib.run(self) run_triggers('install_lib', 'post', args=(self,))
def run(self): run_triggers('install_lib', 'pre', args=(self, )) install_lib.run(self) run_triggers('install_lib', 'post', args=(self, ))
def run(self): install_lib.run(self) copy_other_files(self, self.install_dir)
def run (self): ''' Also install shared libraries and executables ''' old_install_lib.run(self) lib = 'lib' if struct.calcsize('P') == 8: lib = 'lib64' build = self.get_finalized_command('build') build_shlib = self.get_finalized_command('build_shlib') install = self.get_finalized_command('install') self.verbose = util.DEBUG if install.prefix is None: target_dir = os.path.join(install.install_base, lib) else: target_dir = os.path.join(install.prefix, lib) util.mkdir(target_dir) if build_shlib.install_shared_libraries: for lib in build_shlib.install_shared_libraries: target = target_dir + os.sep source = os.path.join(build_shlib.build_clib, lib[1]) self.copy_file(source, target) if self.distribution.extra_install_modules: ## prefer updated packages local_pkgs_dir = os.path.join(build.build_base, util.local_lib_dir) insertions = 0 if os.path.exists(local_pkgs_dir): sys.path.insert(0, os.path.abspath(local_pkgs_dir)) insertions += 1 for ent in os.listdir(os.path.abspath(local_pkgs_dir)): if os.path.isdir(os.path.join(local_pkgs_dir, ent)) and \ ent[-4:] == '.egg': pth = os.path.join(local_pkgs_dir, ent) sys.path.insert(0, os.path.abspath(pth)) insertions += 1 module_dir = install.install_platlib for mod in self.distribution.extra_install_modules: source = util.get_module_location(mod, local_pkgs_dir) if os.path.isdir(source): self.copy_tree(source, os.path.join(module_dir, mod)) else: self.copy_file(source, module_dir) for i in range(insertions): sys.path.pop(0) if self.distribution.extra_install_libraries: for pkg_tpl in self.distribution.extra_install_libraries: for lib_tpl in pkg_tpl[1]: libpath = lib_tpl[0] suffixes = ['.so*'] prefixes = ['', 'lib'] if 'windows' in platform.system().lower(): suffixes = ['.dll'] elif 'darwin' in platform.system().lower(): suffixes += ['.dylib*'] for prefix in prefixes: for suffix in suffixes: for libname in lib_tpl[1]: filename = prefix + libname + '*' + suffix for source in glob.glob(os.path.join(libpath, filename)): self.copy_file(source, target_dir)
def run(self): install_lib.run(self)
def run(self): # Remove useless files os.remove(os.path.join(self.build_dir, 'wapiti', 'wapiti.py')) install_lib.run(self)
def run(self): self.mkpath(self.install_dir) self.copy_file("libelliptics_python.so", self.install_dir) _install_lib.run(self)
def run(self): install_lib.run(self) # the apr binaries. # On Windows we package up the apr dlls with the plugin. for s, d in self._get_dlls(): self.copy_file(s, d)
def run(self): check_manifest() build_message_files(self) base.run(self)
def run(self): self.install_dir = self.getDir_nop('purelibdir') _install_lib.run(self)
def run(self): install_lib.run(self)
def run(self): installcmd.run(self) finder.copy_files(self, self.install_dir)
def run(self): install_lib.run(self) # super.run() if os.name != 'posix': return launch = os.path.join(self.install_dir, 'zeroinstall/0launch-gui/0launch-gui') os.chmod(launch, os.stat(launch).st_mode | 0111)
def run(self): install_lib.run(self) for p in self.distribution.packages: self.remove_uncompiled_python(p)