def finalize_options(self): # Add openalea package link if (not self.install_dyn_lib): self.install_dyn_lib = get_dyn_lib_dir() self.install_dyn_lib = os.path.expanduser(self.install_dyn_lib) print('INSTALL LIB: ', self.install_dyn_lib) old_install.finalize_options(self)
def finalize_options(self): install.finalize_options(self) if self.init_system and isinstance(self.init_system, str): self.init_system = self.init_system.split(",") if len(self.init_system) == 0: raise DistutilsArgError( ("You must specify one of (%s) when" " specifying init system(s)!") % (", ".join(INITSYS_TYPES))) bad = [f for f in self.init_system if f not in INITSYS_TYPES] if len(bad) != 0: raise DistutilsArgError( "Invalid --init-system: %s" % (','.join(bad))) for system in self.init_system: # add data files for anything that starts with '<system>.' datakeys = [k for k in INITSYS_ROOTS if k.partition(".")[0] == system] for k in datakeys: self.distribution.data_files.append( (INITSYS_ROOTS[k], INITSYS_FILES[k])) # Force that command to reinitalize (with new file list) self.distribution.reinitialize_command('install_data', True)
def finalize_options(self): _install.finalize_options(self) self.set_undefined_options( 'build', ('rpm_version', 'rpm_version'), ('gtk_version', 'gtk_version') )
def finalize_options(self): self.single_version_externally_managed = True orig_root = self.root # avoid original install fail on SVEM + not root if not orig_root: self.root = sep setuptools_install.finalize_options(self) self.root = orig_root
def finalize_options(self): install.finalize_options(self) self.card_version = self.card_version if self.card_version else "1.0.4" if self.card_version and not self.card_url: assert self.card_version != '1.0.0', 'Version 1.0.0 not supported' assert "." in self.card_version, 'Invalid Card Version {0!r:s}' assert all(map(str.isdigit, self.card_version.split("."))), 'Invalid Card Version {0!r:s}' self.card_url = 'https://card.mcmaster.ca/download/0/broadsteet-v{0:s}.tar.gz'.format(self.card_version) elif self.card_url: assert self.card_url.startswith("http"), "URL must start with http " import urllib2 request = urllib2.Request(self.card_url) request.get_method = lambda: 'HEAD' try: response = urllib2.urlopen(request) assert int(response.getcode()) < 400, \ 'HTTP Error {0:s}: ({1:s})'.format(response.response.getcode(), self.card_url) assert response.info().type != 'text/html', 'URL {0:s} points to webpage not file'.format(self.card_url) except urllib2.HTTPError as e: print 'HTTP Error {0:s}: {1:s} ({2:s})'.format(e.code, e.msg, e.url) raise except: print 'Malformed CARD URL Error' print u'If you do did not specify the URL:\'{0:s}\' or version:\'{1:s}\' then either CARD is down or ' \ u'the link has changed, you may be able to remedy this by specifying a url or version with ' \ u'--card-version=\'version\' or --card-url=\'url\' after \'{2:s}\''\ .format(self.card_url, self.card_version, ' '.join(sys.argv)) raise
def finalize_options(self): if (self.config_file is not None and not os.access(self.config_file, os.R_OK)): raise RuntimeError("Default config file %s is not readable." % self.config_file) install.finalize_options(self)
def finalize_options(self): """ Calls the regular ``finalize_options()`` method and adjusts the path to the 'gateone' script inside init scripts, .conf, and .service files. """ install.finalize_options(self) if skip_init: return gateone_path = os.path.join(self.install_scripts, 'gateone') if os.path.exists(temp_script_path): with io.open(temp_script_path, encoding='utf-8') as f: temp = f.read() temp = temp.replace('GATEONE=gateone', 'GATEONE=%s' % gateone_path) with io.open(temp_script_path, 'w', encoding='utf-8') as f: f.write(temp) if os.path.exists(upstart_temp_path): with io.open(upstart_temp_path, encoding='utf-8') as f: temp = f.read() temp = temp.replace('exec gateone', 'exec %s' % gateone_path) with io.open(upstart_temp_path, 'w', encoding='utf-8') as f: f.write(temp) if os.path.exists(systemd_temp_path): with io.open(systemd_temp_path, encoding='utf-8') as f: temp = f.read() temp = temp.replace( 'ExecStart=gateone', 'ExecStart=%s' % gateone_path) with io.open(systemd_temp_path, 'w', encoding='utf-8') as f: f.write(temp) if os.path.exists(bsd_temp_script): with io.open(bsd_temp_script, encoding='utf-8') as f: temp = f.read() temp = temp.replace( 'command=gateone', 'command=%s' % gateone_path) with io.open(bsd_temp_script, 'w', encoding='utf-8') as f: f.write(temp)
def finalize_options(self): _install.finalize_options(self) if self.etc_path is None: self.etc_path = default_paths['etc'] if self.var_path is None: self.var_path = default_paths['var'] if self.run_path is None: self.run_path = default_paths['run'] if self.log_path is None: self.log_path = default_paths['log'] if self.plugins_path is None: self.plugins_path = default_paths['libexec'] if self.owner is None: self.owner = DEFAULT_OWNER if self.group is None: self.group = DEFAULT_GROUP if self.exclude_doc is 1: # self.distribution.data_files is list of tuples, # each tuple is a (directory name, [list of files]). # we remove here all files that start with 'doc/' for data_tuple in self.distribution.data_files: data_file_list = data_tuple[1] for data_file in data_file_list: if data_file.startswith('doc/'): print "removing doc file {0}".format(data_file) data_file_list.remove(data_file) # finally cleanup list of data files to remove empty dirs self.distribution.data_files = [(data_dir, data_files) \ for data_dir, data_files \ in self.distribution.data_files \ if len(data_files) != 0 ]
def finalize_options(self): install.finalize_options(self) logged_warnings = False for optname in ('root_dir', 'config_dir', 'cache_dir', 'sock_dir', 'srv_root_dir', 'base_file_roots_dir', 'base_pillar_roots_dir', 'base_master_roots_dir', 'logs_dir', 'pidfile_dir'): optvalue = getattr(self, 'salt_{0}'.format(optname)) if optvalue is not None: dist_opt_value = getattr(self.distribution, 'salt_{0}'.format(optname)) logged_warnings = True log.warn( 'The \'--salt-{0}\' setting is now a global option just pass it ' 'right after \'setup.py\'. This install setting will still work ' 'until Salt Boron but please migrate to the global setting as ' 'soon as possible.'.format( optname.replace('_', '-') ) ) if dist_opt_value is not None: raise DistutilsArgError( 'The \'--salt-{0}\' setting was passed as a global option ' 'and as an option to the install command. Please only pass ' 'one of them, preferrably the global option since the other ' 'is now deprecated and will be removed in Salt Boron.'.format( optname.replace('_', '-') ) ) setattr(self.distribution, 'salt_{0}'.format(optname), optvalue) if logged_warnings is True: time.sleep(3)
def finalize_options(self): try: if not self.build_base or self.build_base == 'build': self.build_base = cmaker.SETUPTOOLS_INSTALL_DIR except AttributeError: pass _install.finalize_options(self)
def finalize_options(self): install.finalize_options(self) if self.install_data == "/usr": self.install_data = "/usr/share" if self.install_data.endswith("/usr"): parts = self.install_data.split(os.sep) if parts[-3] == "debian": self.install_data = os.path.join(self.install_data, "share")
def finalize_options(self): _install.finalize_options(self) if self.without_gevent is not None: gevent = lambda pkg: pkg[:6] == 'gevent' and\ (not len(pkg) > 6 or pkg[6] in ['>', '=', '<']) self.distribution.install_requires[:] = ifilterfalse( gevent, self.distribution.install_requires )
def finalize_options(self): global enable_pcre # NOTE: for Pardus distribution if os.path.exists("/etc/pardus-release"): self.install_platlib = '$base/lib/pardus' self.install_purelib = '$base/lib/pardus' enable_pcre = self.enable_pcre install.finalize_options(self)
def finalize_options(self): _install.finalize_options(self) if self.install_appengine is None: try: value = int(os.environ.get('INSTALL_APPENGINE', '0')) except ValueError: value = 0 self.install_appengine = bool(value)
def finalize_options(self): # Distuilts defines attributes in the initialize_options() method # pylint: disable=attribute-defined-outside-init InstallCommand.finalize_options(self) self.install_scripts = os.path.join(self.prefix, 'bin') self.install_lib = os.path.join(self.prefix, 'packages') self.install_data = os.path.join(self.prefix) self.record = os.path.join(self.prefix, 'install.log') self.optimize = 1
def finalize_options(self): log.debug('_install finalize_options') global build_dir install.finalize_options(self) build_dir = self.build_lib # add libgip to runtime path = os.path.abspath(os.path.join(self.install_lib, 'gippy')) if sys.platform != 'darwin': [m.runtime_library_dirs.append(path) for m in swig_modules]
def finalize_options(self): _install.finalize_options(self) if self.skip_data_files: return data_files = get_data_files(self.lnx_distro, self.lnx_distro_version, self.lnx_distro_fullname) self.distribution.data_files = data_files self.distribution.reinitialize_command('install_data', True)
def finalize_options(self): """Alter the installation path.""" install.finalize_options(self) man_dir = os.path.join(self.prefix, "share", "man", "man1") # if we have 'root', put the building path also under it (used normally # by pbuilder) if self.root is not None: man_dir = os.path.join(self.root, man_dir[1:]) self._custom_man_dir = man_dir
def finalize_options(self): _install.finalize_options(self) # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. # Multiple symbols can be separated with semi-colons. if self.define: defines = self.define.split(';') self.define = [(s.strip(), None) if '=' not in s else tuple(ss.strip() for ss in s.split('=')) for s in defines] cargo_opts.extend(self.define)
def finalize_options(self): install.finalize_options(self) if self.init_system and self.init_system not in INITSYS_TYPES: raise DistutilsArgError(("You must specify one of (%s) when" " specifying a init system!") % (", ".join(INITSYS_TYPES))) elif self.init_system: self.distribution.data_files.append( (INITSYS_ROOTS[self.init_system], INITSYS_FILES[self.init_system])) # Force that command to reinitalize (with new file list) self.distribution.reinitialize_command('install_data', True)
def finalize_options(self): _install.finalize_options(self) self.set_undefined_options('build', ('build_qlib', 'build_qlib'), ('build_qext', 'build_qext'), ) dst = self.distribution if self.install_qlib == None: self.install_qlib = dst.qhome if self.install_qext == None: self.install_qext = os.path.join(dst.qhome, dst.qarch)
def finalize_options(self): _install.finalize_options(self) # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols # specified by the 'define' option without an '=' will be set to '1'. # Multiple symbols can be separated with commas. if self.define: defines = self.define.split(',') self.define = [(s.strip(), 1) if '=' not in s else tuple(ss.strip() for ss in s.split('=')) for s in defines] define_opts.extend(self.define)
def finalize_options(self): install.finalize_options(self) if not self.lnx_distro: self.lnx_distro = getDistro() if self.init_system not in ['sysV', 'systemd', 'upstart']: print 'Do not know how to handle %s init system' %self.init_system sys.exit(1) if self.init_system == 'sysV': if not os.path.exists('distro/%s' %self.lnx_distro): msg = 'Unknown distribution "%s"' %self.lnx_distro msg += ', no entry in distro directory' sys.exit(1)
def finalize_options(self): _install.finalize_options(self) if self.skip_data_files: return if self.init_system is not None: print("WARNING: --init-system is deprecated," "use --lnx-distro* instead") data_files = get_data_files(self.lnx_distro, self.lnx_distro_version, self.lnx_distro_fullname) self.distribution.data_files = data_files self.distribution.reinitialize_command('install_data', True)
def finalize_options(self): install.finalize_options(self) if self.no_ml: dist = self.distribution dist.packages=find_packages(exclude=[ 'tests', 'tests.*', 'talon.signature', 'talon.signature.*', ]) for not_required in ['numpy', 'scipy', 'scikit-learn==0.16.1']: dist.install_requires.remove(not_required)
def finalize_options(self): orig_install.finalize_options(self) from os.path import relpath, join install_suffix = relpath(self.install_lib, self.install_libbase) if install_suffix == ".": log.info("skipping install of .pth during easy-install") elif install_suffix == self.extra_path[1]: self.install_lib = self.install_libbase log.info("will install .pth to '%s.pth'", join(self.install_lib, self.extra_path[0])) else: raise AssertionError("unexpeceted install_suffix", self.install_lib, self.install_libbase, install_suffix)
def finalize_options(self): install.finalize_options(self) for optname in ('root_dir', 'config_dir', 'cache_dir', 'sock_dir', 'srv_root_dir', 'base_file_roots_dir', 'base_pillar_roots_dir', 'base_master_roots_dir', 'logs_dir', 'pidfile_dir'): optvalue = getattr(self, 'salt_{0}'.format(optname)) if not optvalue: raise RuntimeError( 'The value of --salt-{0} needs a proper path value'.format( optname.replace('_', '-') ) ) setattr(self.distribution, 'salt_{0}'.format(optname), optvalue)
def finalize_options(self): _install.finalize_options(self) # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. # Multiple symbols can be separated with semi-colons. if self.define: defines = self.define.split(';') self.define = [(s.strip(), None) if '=' not in s else tuple(ss.strip() for ss in s.split('=')) for s in defines] cmake_opts.extend(self.define) cmake_build_type[0] = self.build_type cmake_opts.extend([('PYTHON_INSTALL_PATH', self.install_platlib)]) cmake_opts.extend([('PYTHON_INSTALL_HEADER_PATH', self.install_headers)])
def finalize_options(self): has_local = False for path in sys.path: if path.startswith("/usr/local"): has_local = True break if has_local: from distutils.sysconfig import get_config_vars prefix, exec_prefix = get_config_vars("prefix", "exec_prefix") if not self.prefix and prefix == "/usr": self.prefix = "/usr/local" if not self.exec_prefix and exec_prefix == "/usr": self.exec_prefix = "/usr/local" old_install.finalize_options(self)
def finalize_options(self): _install.finalize_options(self) if self.etc_path is None: self.etc_path = default_paths['etc'] if self.var_path is None: self.var_path = default_paths['var'] if self.run_path is None: self.run_path = default_paths['run'] if self.log_path is None: self.log_path = default_paths['log'] if self.plugins_path is None: self.plugins_path = default_paths['libexec'] if self.owner is None: self.owner = DEFAULT_OWNER if self.group is None: self.group = DEFAULT_GROUP
def finalize_options(self): global build_mpi if not build_mpi: build_mpi = bool(self.mpi) install.finalize_options(self)
def finalize_options(self): _install.finalize_options(self) self.set_undefined_options('build', ('rpm_version', 'rpm_version'), ('gtk_version', 'gtk_version'))
def finalize_options(self): install.finalize_options(self) self._restore_install_lib()
def finalize_options(self): install_org.finalize_options(self) self.single_version_externally_managed = True
def finalize_options(self): if self.flavor is None: self.flavor = current_template.flavor log.info('flavor {0}'.format(self.flavor)) return _install.finalize_options(self)
def finalize_options(self): self.distribution.ext_modules = get_ext_modules() install.finalize_options(self)
def finalize_options(self): build_cmd = self.get_finalized_command('build') platlib_dir = _get_platlib_dir(build_cmd) self.build_lib = platlib_dir SetuptoolsInstall.finalize_options(self)
def finalize_options(self): _install.finalize_options(self) if self.distribution.has_executables(): self.install_lib = self.install_platlib
def finalize_options(self): ret = InstallCommandBase.finalize_options(self) self.install_lib = self.install_platlib return ret
def finalize_options(self): install.finalize_options(self)
def finalize_options(self): generate_luts() self.distribution.ext_modules = get_ext_modules() install.finalize_options(self)
def finalize_options(self): if self.no_clibs: self.no_clibs = True install.finalize_options(self)
def finalize_options(self): install.finalize_options(self) if self.distribution.has_ext_modules(): self.install_lib = self.install_platlib
def finalize_options(self): install_command.finalize_options(self)
def finalize_options(self): install.finalize_options(self) self.install_lib = self.install_platlib
def finalize_options(self): print("build service", self.service) install.finalize_options(self)
def finalize_options(self): ret = InstallCommandBase.finalize_options(self) # pylint: disable=assignment-from-no-return self.install_headers = os.path.join(self.install_platlib, 'tensorflow', 'include') self.install_lib = self.install_platlib return ret
def finalize_options(self): install.finalize_options(self) print('TVM support: ' + ('OFF' if self.enable_tvm is None else 'ON')) print('ONNX support: ' + ('OFF' if self.enable_onnx is None else 'ON'))
def finalize_options(self): self.__check_user() self.loris_owner_id = getpwnam(self.loris_owner).pw_uid self.loris_group_id = getgrnam(self.loris_group).gr_gid install.finalize_options(self)
def finalize_options(self): if not os.path.exists('./xcffib'): print("It looks like you need to generate the binding.") print("please run 'make xcffib' or 'make check'.") sys.exit(1) install.finalize_options(self)
def finalize_options(self): _install.finalize_options(self) self.install_lib = self.install_platlib self.install_libbase = self.install_lib
def finalize_options(self): install.finalize_options(self) # Force use of "platlib" dir for auditwheel to recognize this # is a non-pure build self.install_libbase = self.install_platlib self.install_lib = self.install_platlib
def finalize_options(self): install.finalize_options(self) if self.pip_args is None: print('pip_args not set, using default https://pypi.org/simple/')
def finalize_options(self): if not self.large_data_dir is None: self.large_data_dir = os.path.abspath( os.path.expanduser(self.large_data_dir)) install.finalize_options(self)
def finalize_options(self): print("value of someopt is", self.someopt) print("value of someval is", self.someval) install.finalize_options(self)
def finalize_options(self): install.finalize_options(self) self.set_undefined_options('build', ('build_scripts', 'build_scripts'))
def finalize_options(self): install.finalize_options(self) if not self.suitesparse_root: self.suitesparse_root = default_lib_dir if not self.sundials_root: self.sundials_root = default_lib_dir
def finalize_options(self): """For more info; see http://github.com/google/or-tools/issues/616 .""" install.finalize_options(self) self.install_lib = self.install_platlib self.install_libbase = self.install_lib self.install_lib = os.path.join(self.install_lib, self.extra_dirs)
def finalize_options(self): ret = InstallCommandBase.finalize_options(self) self.install_headers = os.path.join(self.install_purelib, 'tensorflow', 'include') return ret
def finalize_options(self): # if self.boost_location is not None: # self.boost_location = os.path.expanduser(self.boost_location) return _install.finalize_options(self)