def finalize_options(self):

        if self.prefix == "auto":
            cmd = "pkg-config --variable=prefix libgnome2.0"
            err, val = commands.getstatusoutput(cmd)
            if not err:
                self.prefix = val
            else:
                sys.exit("Cannot find prefix: %s. pkgconfig not installed?" % val)

        self.sysconfdir = os.path.join(self.prefix, self.sysconfdir)
        if self.root:
            self.sysconfdir = os.path.normpath(self.root + "/" + self.sysconfdir)

        if self.root and self.with_gconf_schema_file_dir:
            self.with_gconf_schema_file_dir = os.path.normpath(self.root + "/" + self.with_gconf_schema_file_dir)

        if not self.disable_schemas_install:
            # Sanity check
            if not os.path.exists(self.with_gconftool):
                print "gconftool-2 executable not found in your path " + "- should be installed with GConf"
                sys.exit(1)

            if self.with_gconf_source == "auto":
                cmd = "%s --get-default-source" % self.with_gconftool
                self.with_gconf_source = commands.getoutput(cmd)

            if self.with_gconf_source and self.root:
                self.with_gconf_source = self.with_gconf_source.replace("xml::", "xml::%s" % self.root)
            elif not self.with_gconf_source:
                fmt = "xml::%s/gconf/gconf.xml.defaults"
                self.with_gconf_source = fmt % self.sysconfdir

        # Run this after we (possibly) have changed prefix.
        install.finalize_options(self)
示例#2
0
文件: setup.py 项目: giffels/DBS
  def finalize_options(self):
    # Check options.
    if self.system == None:
      print "System not specified, please use '-s dbs-web', 'dbs-client', 'pycurl-client', 'dbs-migration',\
'LifeCycleTests' or 'LifeCycleAnalysis'"
      sys.exit(1)
    elif self.system not in systems:
      print "System %s unrecognised, please use '-s dbs-web', 'dbs-client', 'pycurl-client', 'dbs-migration',\
'LifeCycleTests' or 'LifeCycleAnalysis'" % self.system
      sys.exit(1)
    if self.patch and not os.path.isdir("%s/xbin" % self.prefix):
      print "Patch destination %s does not look like a valid location." % self.prefix
      sys.exit(1)

    # Expand various sources, but don't build anything from c++ now.
    define_the_build(self, self.distribution, self.system,
		     False, (self.patch and 'x') or '')

    # Whack the metadata name.
    self.distribution.metadata.name = self.system
    assert self.distribution.get_name() == self.system

    # Pass to base class.
    install.finalize_options(self)

    # Mangle paths if we are patching. Most of the mangling occurs
    # already in define_the_build(), but we need to fix up others.
    if self.patch:
      self.install_lib = re.sub(r'(.*)/lib/python(.*)', r'\1/xlib/python\2', self.install_lib)
      self.install_scripts = re.sub(r'(.*)/bin$', r'\1/xbin', self.install_scripts)
    def finalize_options(self):
        if self.static:
            log.info("Linking C Extension statically with libraries")
            self.distribution.cmdclass['build_ext'] = BuildExtStatic

        if self.byte_code_only is None:
            self.byte_code_only = False

        build_ext_obj = self.distribution.get_command_obj('build_ext')
        build_ext_obj.with_mysql_capi = self.with_mysql_capi
        build_ext_obj.with_protobuf_include_dir = self.with_protobuf_include_dir
        build_ext_obj.with_protobuf_lib_dir = self.with_protobuf_lib_dir
        build_ext_obj.with_protoc = self.with_protoc
        build_ext_obj.extra_compile_args = self.extra_compile_args
        build_ext_obj.extra_link_args = self.extra_link_args
        build_ext_obj.static = self.static

        if self.with_mysql_capi:
            self.need_ext = True

        if not self.need_ext:
            remove_cext(self.distribution, "_mysql_connector")

        self.with_mysqlxpb_cext = all((self.with_protobuf_include_dir,
                                       self.with_protobuf_lib_dir,
                                       self.with_protoc))

        if not self.with_mysqlxpb_cext:
            remove_cext(self.distribution, "_mysqlxpb")

        install.finalize_options(self)
示例#4
0
文件: setup.py 项目: archphy/22.213
  def finalize_options(self):
    """Extract options from the flags invoked by the user at compile time.
    This method performs error checking of the options specified by
    the user at compile time, and initialize the config.configurations
    class instance. The method conclude with a call to the
    configurations.setup_extension_modules class method which builds
    a list of C/C++/CUDA extension modules to be passed to the distutils
    setup method at the end of this script.
    """

    # Run the install command parent class' finalize_options method
    install.finalize_options(self)

    config.with_ccache = self.with_ccache
    
    # Check that the user specified a supported C++ compiler
    if self.cc not in ['gcc']:
      raise DistutilsOptionError \
            ('Must supply the -cc flag with one of the supported ' +
             'C++ compilers: gcc')
    else:
      config.cc = self.cc

    # Build the openmoc.gnu.single and/or openmoc.gnu.double
    # extension module(s)
    if self.with_gcc:
      config.cpp_compilers += ['gcc']

    # Build a list of the C/C++/CUDA extension modules to be built
    # for this distribution
    config.setup_extension_modules()
 def finalize_options(self):
     install.finalize_options(self)
     self.record = self.distribution.uninstall_files
     with open(self.distribution.uninstall_prefix, "w") as _f:
         _f.write("[install]\n")
         _f.write('install_scripts = {}\n'.format(os.path.normpath(self.install_scripts)))
         _f.write('install_lib = {}\n'.format(os.path.normpath(self.install_lib)))
示例#6
0
    def finalize_options(self):
        # Check that the sub-system is valid
        check_system(self)
        # Check install destination looks valid if patching.
        if self.patch and not os.path.isdir("%s/xbin" % self.prefix):
            print("Patch destination %s does not look like a valid location." % self.prefix)
            sys.exit(1)
        # Set what actually gets installed
        self.distribution.packages, self.distribution.py_modules = things_to_build(self)
        self.distribution.data_files = list_static_files(dependencies[self.system])
        docroot = "%s/doc/build/html" % get_path_to_wmcore_root()
        for dirpath, dirs, files in os.walk(docroot):
	    self.distribution.data_files.append(("doc%s" % dirpath[len(docroot):],
	                                         ["%s/%s" % (dirpath, fname) for fname in files
				                  if fname != '.buildinfo']))
        # Mangle data paths if patching.
	if self.patch:
          self.distribution.data_files = [('x' + dir, files) for dir, files in self.distribution.data_files]

        print_build_info(self)

        self.distribution.metadata.name = self.system
        assert self.distribution.get_name() == self.system

        install.finalize_options(self)

	# Convert to patch install if so requested
        if self.patch:
            self.install_lib = re.sub(r'(.*)/lib/python(.*)', r'\1/xlib/python\2', self.install_lib)
            self.install_scripts = re.sub(r'(.*)/bin$', r'\1/xbin', self.install_scripts)
示例#7
0
    def finalize_options(self):
        """Alter the installation path."""
        install.finalize_options(self)

        # the data path is under 'prefix'
        data_dir = os.path.join(self.prefix, "share",
                                self.distribution.get_name())
        apps_dir = os.path.join(self.prefix, "share", "applications")
        apport_dir = os.path.join(self.prefix, "share",
                                  "apport", "package-hooks")
        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 None:
            build_dir = data_dir
        else:
            build_dir = os.path.join(self.root, data_dir[1:])
            apps_dir = os.path.join(self.root, apps_dir[1:])
            apport_dir = os.path.join(self.root, apport_dir[1:])
            man_dir = os.path.join(self.root, man_dir[1:])

        # change the lib install directory so all package files go inside here
        self.install_lib = build_dir

        # save this custom data dir to later change the scripts
        self._custom_data_dir = data_dir
        self._custom_apps_dir = apps_dir
        self._custom_apport_dir = apport_dir
        self._custom_man_dir = man_dir
示例#8
0
文件: setup.py 项目: cmft/sardana
    def finalize_options(self):

        # We do a hack here. We cannot trust the 'install_base' value
        # because it is not always the final target. For example, in
        # unix, the install_base is '/usr' and all other install_* are
        # directly relative to it. However, in unix-local (like
        # ubuntu) install_base is still '/usr' but, for example,
        # install_data, is '$install_base/local' which breaks
        # everything.
        #
        # The hack consists in using install_data instead of
        # install_base since install_data seems to be, in practice,
        # the proper install_base on all different systems.

        dftinstall.finalize_options(self)
        if os.name != "posix":
            if self.install_man is not None:
                self.warn("install-man option ignored on this platform")
                self.install_man = None
        elif self.install_man is None:
            self.install_man = os.path.join(self.install_data,
                                            'share', 'man')
        if self.install_html is None:
            self.install_html = os.path.join(self.install_data,
                                             'share', 'doc', 'sardana', 'html')
示例#9
0
    def finalize_options(self):
        # Check options.
        if self.system not in systems:
            print "System %s unrecognised, please use '-s CRABInterface'" % self.system
            sys.exit(1)
        if self.patch and not os.path.isdir("%s/xbin" % self.prefix):
            print "Patch destination %s does not look like a valid location." % self.prefix
            sys.exit(1)

        # Expand various sources, but don't build anything from c++ now.
        define_the_build(self.distribution, self.system, (self.patch and 'x') or '')

        # Whack the metadata name.
        self.distribution.metadata.name = self.system
        assert self.distribution.get_name() == self.system

        # Pass to base class.
        install.finalize_options(self)

        # Mangle paths if we are patching. Most of the mangling occurs
        # already in define_the_build(), but we need to fix up others.
        if self.patch:
            self.install_lib = re.sub(r'(.*)/lib/python(.*)', r'\1/xlib/python\2', self.install_lib)
            self.install_scripts = re.sub(r'(.*)/bin$', r'\1/xbin', self.install_scripts)
            self.install_data = re.sub(r'(.*)/data$', r'\1/xdata', self.install_data)
示例#10
0
 def finalize_options(self):
     # Ubuntu's python2.6-2.6.4-0ubuntu3 package changes sys.prefix in
     # install.finalize_options when sys.prefix is "/usr/local" (our
     # default). Because we need the unchanged value later, remember it
     # here.
     self.saved_prefix = self.prefix
     install.finalize_options(self)
示例#11
0
    def finalize_options(self):
        if self.home or self.user:
            raise errors.DistutilsOptionError('Options --home and --user '
                                              'are not allowed by this '
                                              'project.')

        install_.finalize_options(self)
示例#12
0
	def finalize_options(self):
		install.finalize_options(self)	# super.finalize_options()
		if self.home:
			self.__config_dir = os.path.join(self.home, '.config')
		elif self.prefix == '/usr':
			self.__config_dir = os.path.join(self.root or '/', 'etc/xdg')
		else:
			self.__config_dir = os.path.join(self.root or '/', self.prefix[1:], 'etc/xdg')
示例#13
0
文件: setup.py 项目: bukzor/catbox
 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)
示例#14
0
	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")
示例#15
0
    def finalize_options(self):
        ### if no prefix is given, configuration should go to /etc or in {prefix}/etc otherwise
        if self.prefix:
            self.conf_prefix = self.prefix + "/etc/prewikka"
        else:
            self.conf_prefix = "/etc/prewikka"

        install.finalize_options(self)
示例#16
0
	def finalize_options(self):
		if self.manprefix is None :
			self.manprefix = "/usr/local/share/"
		if self.qlprefix is None :
			self.qlprefix = os.path.expanduser('~') + "/.quodlibet/plugins/"
		if self.localprefix is None :
			self.localprefix = "/usr/share/locale/"
		install.finalize_options(self)
示例#17
0
 def finalize_options(self):
     install.finalize_options(self)
     if self.install_messages is None:
         self.install_messages = os.path.join(self.install_data, 'share',
                                              'locale')
     if self.install_app_data is None:
         name = self.distribution.get_name()
         self.install_app_data = os.path.join(self.install_data, 'share',
                                              name)
示例#18
0
 def finalize_options(self):
     opt_dict = self.distribution.get_option_dict('install')
     if self.prefix:
         raise DistutilsOptionError("--prefix is not allowed")
     opt_dict['prefix'] = ("bdist_conda", config.build_prefix)
     if not PY3:
         # Command is an old-style class in Python 2
         install.finalize_options(self)
     else:
         super().finalize_options()
示例#19
0
 def finalize_options(self):
     _install.finalize_options(self)
     if self.root:
         self.single_version_externally_managed = True
     elif self.single_version_externally_managed:
         if not self.root and not self.record:
             raise DistutilsArgError(
                 "You must specify --record or --root when building system"
                 " packages"
             )
示例#20
0
 def finalize_options(self):
     _install.finalize_options(self)
     if not self.settings or self.settings == 'default.dev':
         self.settings_module = os.path.join('dam', 'settings.py.default.dev')
     elif self.settings == 'default':
         self.settings_module = os.path.join('dam', 'settings.py.default')
     elif self.settings == 'mysql':
         self.settings_module = os.path.join('dam', 'settings.py.mysql')
     else:
         raise DistutilsOptionError('Invalid value for --settings: %s' % self.settings)
示例#21
0
文件: setup.py 项目: ichigo-0/xcffib
    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)

        import xcffib

        self.distribution.ext_modules = [xcffib.ffi.verifier.get_extension()]
        install.finalize_options(self)
示例#22
0
 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)
示例#23
0
文件: setup.py 项目: kevinarpe/kx
 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)
示例#24
0
文件: setup.py 项目: drjvnv/avoplot
 def finalize_options (self):
     """
     Override the finalize_options method to record the install paths so that
     we can copy them into the build_info.py file during post-install
     """
     install.finalize_options(self)
     
     #note that these MUST be absolute paths
     self.install_paths['prefix'] = os.path.abspath(self.install_base)
     self.install_paths['install_data'] = os.path.abspath(self.install_data)
     self.install_paths['lib_dir'] = os.path.abspath(self.install_lib)
     self.install_paths['script_dir'] = os.path.abspath(self.install_scripts)
示例#25
0
    def finalize_options(self):
        install.finalize_options(self)

        data_dir = os.path.join(self.prefix, "share", self.distribution.get_name())

        if self.root is None:
            build_dir = data_dir
        else:
            build_dir = os.path.join(self.root, data_dir[1:])

        self.install_lib = build_dir
        self._custom_data_dir = data_dir
示例#26
0
    def finalize_options(self):
        if self.prefix is None:
            if cliconfig.prefix != sysprefix:
                print "Using prefix from 'configure': %s" % cliconfig.prefix
                self.prefix = cliconfig.prefix
        elif self.prefix != cliconfig.prefix:
            print ("Install prefix=%s doesn't match configure prefix=%s\n"
                   "Pass matching --prefix to 'setup.py configure'" %
                   (self.prefix, cliconfig.prefix))
            sys.exit(1)

        install.finalize_options(self)
示例#27
0
文件: setup.py 项目: tdaff/portage
	def finalize_options(self):
		install.finalize_options(self)

		# substitute variables
		new_paths = {
			'package': self.distribution.get_name(),
			'version': self.distribution.get_version(),
		}
		for key, default in self.paths:
			new_paths[key] = subst_vars(getattr(self, key), new_paths)
			setattr(self, key, new_paths[key])
		self.subst_paths = new_paths
    def finalize_options(self):
        install.finalize_options(self)
        if self.uninstall is None:
            self.uninstall = False
        # Ensure metadata is up-to-date
        build_egg_info = self.get_finalized_command('build_egg_info')
        build_egg_info.run()
        egg_base, egg_info = os.path.split(build_egg_info.egg_info_path)
        egg_pth = os.path.splitext(egg_info)[0] + '.pth'

        # create an .pth in the installation dir, pointing to our egg
        self.egg_base = os.path.abspath(egg_base)
        self.egg_pth = os.path.join(egg_base, egg_pth)
示例#29
0
文件: setup.py 项目: queer1/picard
 def finalize_options(self):
     install.finalize_options(self)
     if self.install_locales is None:
         self.install_locales = '$base/share/locale'
         self._expand_attrs(['install_locales'])
     self.install_locales = os.path.normpath(self.install_locales)
     self.localedir = self.install_locales
     # can't use set_undefined_options :/
     self.distribution.get_command_obj('build').localedir = self.localedir
     self.distribution.get_command_obj('build').disable_autoupdate = self.disable_autoupdate
     if self.root is not None:
         self.change_roots('locales')
     if self.disable_locales is None:
         self.sub_commands.append(('install_locales', None))
示例#30
0
文件: setup.py 项目: cpascual/PyTango
 def finalize_options(self):
     dftinstall.finalize_options(self)
     # We do a hack here. We cannot trust the 'install_base' value because it
     # is not always the final target. For example, in unix, the install_base
     # is '/usr' and all other install_* are directly relative to it. However,
     # in unix-local (like ubuntu) install_base is still '/usr' but, for
     # example, install_data, is '$install_base/local' which breaks everything.
     #
     # The hack consists in using install_data instead of install_base since
     # install_data seems to be, in practice, the proper install_base on all
     # different systems.
     if self.install_html is None:
         self.install_html = os.path.join(self.install_data,
                                          'share', 'doc', 'PyTango', 'html')
示例#31
0
 def finalize_options(self):
     ret = install.finalize_options(self)
     # Fill in variables in glipper/defs.py
     write_defs_dot_py(data_dir=os.path.join(self.install_base, 'share'),
                       version=self.distribution.get_version())
     return ret
示例#32
0
 def finalize_options(self):
     # Ubuntu's python2.6-2.6.4-0ubuntu3 package changes sys.prefix in
     # install.finalize_options when sys.prefix is "/usr/local" (our
     # default). Because we need the unchanged value later, remember it here.
     self.saved_prefix = self.prefix
     install.finalize_options(self)
示例#33
0
 def finalize_options(self):
     """Finalize options"""
     _install.finalize_options(self)
示例#34
0
 def finalize_options(self):
     install.finalize_options(self)
     # Get us off the do_egg_install() path
     self.single_version_externally_managed = True
示例#35
0
 def finalize_options(self):
     """Finalize options"""
     _install.finalize_options(self)
     self.set_undefined_options('install', ('install_dir', 'install_dir'),
                                ('root', 'root'))
示例#36
0
文件: setup.py 项目: not-jenni/iree
 def finalize_options(self):
     install.finalize_options(self)
     self.install_lib = self.install_platlib
示例#37
0
 def finalize_options(self):
     install.finalize_options(self)
     self.record = self.distribution.uninstall_files
     with open(self.distribution.uninstall_prefix, "w") as _f:
         _f.write("[install]\n")
         _f.write('install_lib = {}\n'.format(os.path.normpath(self.install_lib)))
示例#38
0
 def finalize_options(self):
     """Finalize the options."""
     BaseCommand.finalize_options(self)
     install.finalize_options(self)
     cmd_install_lib = self.distribution.get_command_obj("install_lib")
     cmd_install_lib.byte_code_only = self.byte_code_only
示例#39
0
    def finalize_options(self):
        install.finalize_options(self)

        global RELOCATE
        RELOCATE = self.home
示例#40
0
文件: setup.py 项目: tactmaster/weewx
 def finalize_options(self):
     install.finalize_options(self)
     if self.no_prompt is None:
         self.no_prompt = False
示例#41
0
 def finalize_options(self):
     if not self.install_data or (len(self.install_data) < 8):
         self.install_data = "$base/share/python$py_version_short"
     install.finalize_options(self)
示例#42
0
    def finalize_options(self):
        install.finalize_options(self)

        if self.install_man is None:
            install_man = join(self.prefix, 'share', 'man', 'man1')
            self.install_man = install_man
示例#43
0
 def finalize_options(self):
     global locale
     _install.finalize_options(self)
     locale = self.install_base + "/share/locale"
示例#44
0
 def finalize_options(self):
     install.finalize_options(self)
     self.set_undefined_options('build',
                                ('build_scripts', 'build_scripts'))
示例#45
0
 def finalize_options(self):
     _install.finalize_options (self)
示例#46
0
 def finalize_options(self):
     install.finalize_options(self)
     if self.pymol_path is None:
         self.pymol_path = os.path.join(self.install_libbase, 'pymol', 'pymol_path')
     elif self.root is not None:
         self.pymol_path = change_root(self.root, self.pymol_path)
示例#47
0
 def finalize_options(self):
     install.finalize_options(self)
     if self.distribution.has_ext_modules():
         self.install_lib = self.install_platlib
示例#48
0
文件: setup.py 项目: sulincix/inary
 def finalize_options(self):
     # NOTE: for Sulin distribution
     if os.path.exists("/etc/sulin-release"):
         self.install_platlib = '$base/lib/sulin'
         self.install_purelib = '$base/lib/sulin'
     install.finalize_options(self)
示例#49
0
 def finalize_options(self):
     _install.finalize_options(self)
     self.set_undefined_options('build', ('rpm_version', 'rpm_version'),
                                ('gtk_version', 'gtk_version'))
示例#50
0
 def finalize_options(self):
     # NOTE: for Pardus distribution
     if os.path.exists("/etc/pardus-release"):
         self.install_platlib = '$base/lib/pardus'
         self.install_purelib = '$base/lib/pardus'
     install.finalize_options(self)
示例#51
0
文件: setup.py 项目: jjehannet/Bento
 def finalize_options(self):
     install.finalize_options(self)
     print self.config_vars
     print dir(self)
示例#52
0
文件: setup.py 项目: timgates42/obspy
 def finalize_options(self):
     if self.manprefix is None:
         self.manprefix = os.path.join('share', 'man')
     install.finalize_options(self)
示例#53
0
文件: setup.py 项目: mjlong/OpenMOC
  def finalize_options(self):
    """Extract options from the flags invoked by the user at compile time.

    This method performs error checking of the options specified by
    the user at compile time, and initialize the config.configurations
    class instance. The method conclude with a call to the
    configurations.setup_extension_modules class method which builds
    a list of C/C++/CUDA extension modules to be passed to the distutils
    setup method at the end of this script.
    """

    # Run the install command parent class' finalize_options method
    install.finalize_options(self)

    # Set the configuration options specified to be the default
    # unless the corresponding flag was invoked by the user
    config.with_cuda = self.with_cuda
    config.debug_mode = self.debug_mode
    config.with_ccache = self.with_ccache
    config.with_papi = self.with_papi
    config.with_numpy = not self.no_numpy

    # Check that the user specified a supported C++ compiler
    if self.cc not in ['gcc', 'icpc', 'bgxlc']:
      raise DistutilsOptionError \
            ('Must supply the -cc flag with one of the supported ' +
             'C++ compilers: gcc, icpc, bgxlc')
    else:
      config.cc = self.cc

    # Check that the user specified a supported floating point precision
    if self.fp not in ['single', 'double']:
      raise DistutilsOptionError \
          ('Must supply the -cc flag with one of the supported ' +
           'floating point precision levels: single, double')
    else:
      config.fp = self.fp

    # Build the openmoc.gnu.single and/or openmoc.gnu.double
    # extension module(s)
    if self.with_gcc:
      config.cpp_compilers += ['gcc']

      # If a precision level was not specified, use the default
      if not any([self.with_sp, self.with_dp]):
        config.fp_precision += [self.fp]


    # Build the openmoc.intel.single and/or openmoc.intel.double
    # extension module(s)
    if self.with_icpc:

      config.cpp_compilers += ['icpc']

      # If a precision level was not specified, use the default
      if not any([self.with_sp, self.with_dp]):
        config.fp_precision += [self.fp]


    # Build the openmoc.bgxlc.single and/or openmoc.bgxlc.double
    # extension module(s)
    if self.with_bgxlc:
      config.cpp_compilers += ['bgxlc']

      # If a precision level was not specified, use the default
      if not any([self.with_sp, self.with_dp]):
        config.fp_precision += [self.fp]

    # If the user requested to build extra modules (ie, openmoc.gnu.single)
    # using single precision floating point
    if self.with_sp:

      # If no compiler was specified, thrown an error
      if not any([self.with_gcc, self.with_icpc, not self.with_bgxlc]):
        raise DistutilsOptionError \
            ('Must supply either with-gcc/with-icpc/with-bgxlc for ' +
             'the with-sp option')

      # Otherwise add the single precision option
      else:
        config.fp_precision += ['single']


    # If the user requested to build extra modules (ie, openmoc.gnu.single)
    # using single precision floating point
    if self.with_dp:

      # If no compiler was specified, thrown an error
      if not any([self.with_gcc, self.with_icpc, not self.with_bgxlc]):
        raise DistutilsOptionError \
            ('Must supply either with-gcc/with-icpc/with-bgxlc for ' +
             'the with-dp option')

      # Otherwise add the double precision option
      else:
        config.fp_precision += ['double']

    # Build a list of the C/C++/CUDA extension modules to be built
    # for this distribution
    config.setup_extension_modules()
示例#54
0
 def finalize_options(self):
     install.finalize_options(self)
     if self.manprefix is None:
         self.manprefix = os.path.join(self.install_scripts, '..', 'share',
                                       'man')
示例#55
0
文件: install.py 项目: saimir/FRED
 def finalize_options(self):
     "Set defaults of attributes"
     _install.finalize_options(self)
     install_parent.finalize_options(self)
     if not self.record and not self.no_record:
         self.record = 'install.log'
示例#56
0
 def finalize_options(self):
     if self.localprefix is None:
         self.localprefix = "/usr/share/locale/"
     install.finalize_options(self)