def finalize_options(self): self.set_undefined_options('build_html', ('build_base', 'build_base'), ('html_temp', 'html_temp')) self.set_undefined_options('install', ('skip_build', 'skip_build')) install_data.finalize_options(self)
def finalize_options(self): if self.install_dir is None: installobj = self.distribution.get_command_obj('install') #self.install_dir = installobj.install_platlib self.install_dir = installobj.install_lib install_data.finalize_options(self)
def finalize_options(self): install_data.finalize_options(self) ETC_LRMSURGEN = "/etc/lrmsurgen" if self.root is not None: ETC_LRMSURGEN = os.path.join(self.root, ETC_LRMSURGEN[1:]) if not os.path.exists(ETC_LRMSURGEN): os.makedirs(ETC_LRMSURGEN) lrmsurgen_conf = os.path.join(ETC_LRMSURGEN, "lrmsurgen.conf") lrmsurgen_umap = os.path.join(ETC_LRMSURGEN, "usermap") lrmsurgen_pmap = os.path.join(ETC_LRMSURGEN, "projectmap") if os.path.exists(lrmsurgen_conf): print "Skipping installation of lrmsurgen.conf (already exists)" self.data_files.remove(("/etc/lrmsurgen", ["datafiles/etc/lrmsurgen.conf"])) if os.path.exists(lrmsurgen_umap): print "Skipping installation of usermap (already exists)" self.data_files.remove(("/etc/lrmsurgen", ["datafiles/etc/usermap"])) if os.path.exists(lrmsurgen_pmap): print "Skipping installation of projectmap (already exists)" self.data_files.remove(("/etc/lrmsurgen", ["datafiles/etc/projectmap"]))
def finalize_options(self): # By the time finalize_options is called, install.install_lib is # set to the # fixed directory, so we set the installdir to install_lib. The # install_data class uses ('install_data', 'install_dir') instead. self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self)
def finalize_options (self): self.set_undefined_options('install', ('src_dir', 'src_dir')) if self.src_dir is None: self.src_dir = "." install_data.finalize_options(self)
def finalize_options(self): install_data.finalize_options(self) self.data_files = [] for root,dirs,files in os.walk(BUILD_MAN_PATH): for filename in files: self.data_files += [(path.join(self.install_dir,root[6:]), [path.join(root,filename)])]
def finalize_options(self): install_data.finalize_options(self) if self.install_dir != os.path.join(self.root, sys.prefix): OrangeInstallDir = os.path.join(self.install_dir, "orange") OrangeInstallDoc = os.path.join(self.install_dir, "doc", "orange") # OrangeInstallLib = os.path.join(self.install_dir, "lib") self.data_files = [(OrangeInstallDir, OrangeLibs), (os.path.join(OrangeInstallDir, "OrangeWidgets", "icons"), OrangeWidgetIcons), (os.path.join(OrangeInstallDir, "OrangeCanvas", "icons"), OrangeCanvasIcons), (os.path.join(OrangeInstallDir, "OrangeCanvas"), OrangeCanvasPyw)] for root, dirs, files in os.walk(os.path.join("doc")): OrangeDocs = glob(os.path.join("", "")) # Create a Docs file list if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS directories for name in files: OrangeDocs += glob(os.path.join(root,name)) if(root.split('doc/')[-1] == 'doc/'): root = '' self.data_files += [(os.path.join(OrangeInstallDoc, root.split('doc/')[-1]), OrangeDocs)] self.data_files += [(OrangeInstallDoc,['setup.py'])]
def finalize_options(self): install_data.finalize_options(self) self.set_undefined_options( "install", ("sysconfdir", "sysconfdir"), ("with_gconf_schema_file_dir", "with_gconf_schema_file_dir") ) self.install_dir = self.sysconfdir self.option_to_dir()
def finalize_options(self): _install_data.finalize_options(self) locale_dir = os.path.join("share", "locale") patt = os.path.join("build", "locale", "*", "LC_MESSAGES", "gputio.mo") for mo in glob.glob(patt): lang = os.path.basename(os.path.dirname(os.path.dirname(mo))) dest_dir = os.path.join("share", "locale", lang, "LC_MESSAGES") self.data_files.append((dest_dir, [mo]))
def finalize_options(self): install_data.finalize_options(self) self.set_undefined_options('build_desktop', ('build_base', 'build_dir')) self.set_undefined_options('install',('install_data','install_dir'), ('skip_build', 'skip_build')) self.set_undefined_options('install', ('with_desktop_file_dir', 'with_desktop_file_dir'))
def finalize_options(self): install_data.finalize_options(self) self.set_undefined_options( 'install', ('sysconfdir', 'sysconfdir'), ('with_gconf_schema_file_dir', 'with_gconf_schema_file_dir')) self.install_dir = self.sysconfdir self.option_to_dir()
def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self # end def finalize_options # end class osx_install_data if sys.platform == 'darwin': cmdclasses = {'install_data': osx_install_data} else: cmdclasses = {'install_data': install_data} # end if def fullsplit(path, result=None): """ Split a pathname into components (the opposite of os.path.join) in a platform-neutral way. """ if result is None: result = [] head, tail = os.path.split(path) if head == '': return [tail] + result if head == path: return result return fullsplit(head, [tail] + result) # end def fullsplit for dirpath, dirnames, filenames in os.walk('blueprints'): # Ignore dirnames that start with '.' for i, dirname in enumerate(dirnames): if dirname.startswith('.'): del dirnames[i] # end for if '__init__.py' in filenames: packages.append('.'.join(fullsplit(dirpath))) elif filenames: data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) # end if # end for setup( name='Builder Blueprints', version='0.1.0', author='Brandon Ashworth', author_email='*****@*****.**', packages=packages, url='', license='LICENSE.txt', description='Blueprint plugins for Builder', long_description='', install_requires=[ "jinja2", ], data_files = data_files, cmdclass = cmdclasses )
def finalize_options(self): _install_data.finalize_options(self) if 'install' in sys.argv: self.set_undefined_options('install', *[(k, k) for k in self.UNDEFINED_OPTIONS]) else: install_parent.finalize_options(self) self.set_directories(self.prefix) if not self.record and not self.no_record: self.record = 'install.log' self.srcdir = self.distribution.srcdir self.rundir = self.distribution.rundir
def finalize_options (self): # set install_purelib self.set_undefined_options('install', ('install_purelib','install_purelib')) # set reaming params install_data_org.finalize_options(self) # set hostname if optPanda.has_key('hostname') and optPanda['hostname'] != '': self.hostname = optPanda['hostname'] else: self.hostname = commands.getoutput('hostname -f') # set user and group if optPanda.has_key('username') and optPanda['username'] != '': self.username = optPanda['username'] else: self.username = commands.getoutput('id -un') if optPanda.has_key('usergroup') and optPanda['usergroup'] != '': self.usergroup = optPanda['usergroup'] else: self.usergroup = commands.getoutput('id -gn')
def finalize_options(self): _install_data.finalize_options(self) self.set_undefined_options('install', ('with_systemd', 'with_systemd')) self.set_undefined_options('install', ('with_subman_gui', 'with_subman_gui')) self.set_undefined_options('install', ('with_cockpit_desktop_entry', 'with_cockpit_desktop_entry')) if self.with_systemd is None: self.with_systemd = True # default to True else: self.with_systemd = self.with_systemd == 'true' if self.with_subman_gui is None: self.with_subman_gui = False # default to False else: self.with_subman_gui = self.with_subman_gui == 'true' # Enable creating desktop entry for cockpit plugin only in case that subman gui will not be # installed if self.with_subman_gui is False: if self.with_cockpit_desktop_entry is None: self.with_cockpit_desktop_entry = True # default to True else: self.with_cockpit_desktop_entry = self.with_cockpit_desktop_entry == 'true' else: self.with_cockpit_desktop_entry = False
def finalize_options(self): install_data.finalize_options(self) # relocation if RELOCATE: print 'relocating to %s' % RELOCATE for (prefix, files) in reversed(self.data_files): if prefix.startswith('/'): new_prefix = os.path.join(RELOCATE, prefix[1:]) self.data_files.remove((prefix, files)) self.data_files.append((new_prefix, files)) # check that we don't overwrite /etc files for (prefix, files) in reversed(self.data_files): if prefix.startswith(os.path.join(RELOCATE or '/', 'etc')): for basefile in files: fn = os.path.join(prefix, os.path.basename(basefile)) if os.path.exists(fn): print 'Skipping installation of %s (already exists)' % fn files.remove(basefile) if not files: self.data_files.remove((prefix, []))
def finalize_options(self): self.set_undefined_options('install', ('htmldir', 'htmldir')) install_data.finalize_options(self)
def finalize_options(self): install_data.finalize_options(self) self.set_undefined_options('build', ('build_base', 'build_base')) self.set_undefined_options('install', ('subst_paths', 'paths'))
def finalize_options(self): self.set_undefined_options('install', ('user', 'user'), ('home', 'home')) _install_data.finalize_options(self)
def finalize_options(self): self.warn_dir = 0 self.install_dir = self.get_finalized_command('install').install_lib install_data.finalize_options(self)
def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'install_dir'), ) install_data.finalize_options(self)
def finalize_options(self): install_data.finalize_options(self) self.set_undefined_options('build_mo', ('build_base', 'build_dir')) self.set_undefined_options('install', ('install_data', 'install_dir'), ('skip_build', 'skip_build'))
def finalize_options(self): # Finalize my superclass's options: install_data.finalize_options(self) # This will set no_prompt to whatever is in weewx_install: self.set_undefined_options("install", ("no_prompt", "no_prompt"))
def finalize_options(self): if self.transforms is None: self.transforms = [] _install_data.finalize_options(self)
def finalize_options(self): install_data.finalize_options(self) self.set_undefined_options("build_desktop", ("build_base", "build_dir")) self.set_undefined_options("install", ("install_data", "install_dir"), ("skip_build", "skip_build")) self.set_undefined_options("install", ("with_desktop_file_dir", "with_desktop_file_dir"))
def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self) # invoke "standard" action
def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self)
def finalize_options(self): # By the time finalize_options is called, install.install_lib is set to # the fixed directory, so we set the installdir to install_lib. The # install_data class uses ('install_data', 'install_dir') instead. self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self)
def finalize_options(self): self.set_undefined_options("build_html", ("build_base", "build_base"), ("html_temp", "html_temp")) self.set_undefined_options("install", ("skip_build", "skip_build")) install_data.finalize_options(self)
def finalize_options(self): # Finalize my superclass's options: install_data.finalize_options(self) # This will set no_prompt to whatever is in weewx_install: self.set_undefined_options('install', ('no_prompt', 'no_prompt'))
def finalize_options(self): self.set_undefined_options('install', ('install_app_data', 'install_dir')) install_data.finalize_options(self) self.appdata = self.distribution.appdata
def finalize_options(self): self.set_undefined_options("install", ("install_lib", "install_dir")) install_data.finalize_options(self)
def finalize_options(self): _install_data.finalize_options(self) py2exe_obj = self.distribution.get_command_obj('py2exe', False) if py2exe_obj is not None: py2exe_obj.ensure_finalized() if (py2exe_obj is not None) and (self.install_dir == py2exe_obj.dist_dir): self.install_dir_arch = self.install_dir self.install_dir_arch_pkg = self.install_dir self.install_dir_indep = self.install_dir self.install_dir_indep_pkg = self.install_dir else: if self.install_dir_arch is None: if sys.platform == 'win32': self.install_dir_arch = self.install_dir else: self.install_dir_arch = os.path.join( self.install_dir, 'lib') if self.install_dir_arch_pkg is None: self.install_dir_arch_pkg = os.path.join( self.install_dir_arch, self.distribution.metadata.name, ) if self.install_dir_indep is None: if sys.platform == 'win32': self.install_dir_indep = self.install_dir else: self.install_dir_indep = os.path.join( self.install_dir, 'share') if self.install_dir_indep_pkg is None: self.install_dir_indep_pkg = os.path.join( self.install_dir_indep, self.distribution.metadata.name, ) if self.data_files is None: self.data_files = [] if self.data_files_arch: self.data_files.extend( self._gen_data_files( self._get_relative_install_dir(self.install_dir_arch), self.data_files_arch, )) if self.data_files_arch_pkg: self.data_files.extend( self._gen_data_files( self._get_relative_install_dir(self.install_dir_arch_pkg), self.data_files_arch_pkg, )) if self.data_files_indep: self.data_files.extend( self._gen_data_files( self._get_relative_install_dir(self.install_dir_indep), self.data_files_indep, )) if self.data_files_indep_pkg: self.data_files.extend( self._gen_data_files( self._get_relative_install_dir(self.install_dir_indep_pkg), self.data_files_indep_pkg, ))