コード例 #1
0
ファイル: setup.py プロジェクト: xbsd/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     soabi = get_config_var('SOABI')
     if soabi and os.uname()[0] == 'Darwin':
         filename = "%s.%s%s" % (filename[:-len(so_ext)], soabi, so_ext)
     return filename
コード例 #2
0
ファイル: setup.py プロジェクト: shang418/JSBSim-internal
 def __init__(self, dist):
     install_lib.__init__(self, dist)
     # Append whichever platform specific extension to the jsbsim module
     # name
     build_ext = self.get_finalized_command('build_ext')
     self.module_name = build_ext.get_ext_filename(
         build_ext.extensions[0].name)
コード例 #3
0
ファイル: setup.py プロジェクト: zjc5415/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     soabi = get_config_var('SOABI')
     if sys.version_info < (3, 5) and soabi and platform == 'Darwin':
         filename = "%s.%s%s" % (filename[:-len(so_ext)], soabi, so_ext)
     return filename
コード例 #4
0
    def run(self):
        # do the normal cleanup
        clean.run(self)

        # try to remove '_composite.{so,pyd,...}' extension,
        # regardless of the current system's extension name convention
        build_ext = self.get_finalized_command('build_ext')
        ext_fname = build_ext.get_ext_filename('overviewer_core.c_overviewer')
        versionpath = os.path.join("overviewer_core", "overviewer_version.py")
        primspath = os.path.join("overviewer_core", "src", "primitives.h")

        for fname in [ext_fname, primspath]:
            if os.path.exists(fname):
                try:
                    log.info("removing '%s'", fname)
                    if not self.dry_run:
                        os.remove(fname)

                except OSError:
                    log.warn("'%s' could not be cleaned -- permission denied",
                             fname)
            else:
                log.debug("'%s' does not exist -- can't clean it", fname)

        # now try to purge all *.pyc files
        for root, dirs, files in os.walk(
                os.path.join(os.path.dirname(__file__), ".")):
            for f in files:
                if f.endswith(".pyc"):
                    if self.dry_run:
                        log.warn("Would remove %s", os.path.join(root, f))
                    else:
                        os.remove(os.path.join(root, f))
コード例 #5
0
ファイル: setup.py プロジェクト: e42s/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     soabi = get_config_var('SOABI')
     if soabi and os.uname()[0] == 'Darwin':
         filename = "%s.%s%s" % (filename[:-len(so_ext)], soabi, so_ext)
     return filename
コード例 #6
0
ファイル: setup.py プロジェクト: lessc0de/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     soabi = get_config_var('SOABI')
     if sys.version_info < (3, 5) and soabi and platform == 'Darwin':
         filename = "%s.%s%s" % (filename[:-len(so_ext)], soabi, so_ext)
     return filename
コード例 #7
0
ファイル: setup.py プロジェクト: PIBM/Minecraft-Overviewer
    def run(self):
        # do the normal cleanup
        clean.run(self)

        # try to remove '_composite.{so,pyd,...}' extension,
        # regardless of the current system's extension name convention
        build_ext = self.get_finalized_command('build_ext')
        ext_fname = build_ext.get_ext_filename('overviewer_core.c_overviewer')
        versionpath = os.path.join("overviewer_core", "overviewer_version.py")
        primspath = os.path.join("overviewer_core", "src", "primitives.h")

        for fname in [ext_fname, primspath]:
            if os.path.exists(fname):
                try:
                    log.info("removing '%s'", fname)
                    if not self.dry_run:
                        os.remove(fname)

                except OSError:
                    log.warn("'%s' could not be cleaned -- permission denied",
                             fname)
            else:
                log.debug("'%s' does not exist -- can't clean it",
                          fname)

        # now try to purge all *.pyc files
        for root, dirs, files in os.walk(os.path.join(os.path.dirname(__file__), ".")):
            for f in files:
                if f.endswith(".pyc"):
                    if self.dry_run:
                        log.warn("Would remove %s", os.path.join(root,f))
                    else:
                        os.remove(os.path.join(root, f))
コード例 #8
0
    def get_ext_filename(self, fullname):
        """Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        """
        from distutils.command.build_ext import build_ext as _du_build_ext

        return _du_build_ext.get_ext_filename(self, fullname)
コード例 #9
0
 def test_get_ext_filename(self):
     # setuptools needs to give back the same
     # result than distutils, even if the fullname
     # is not in ext_map
     dist = Distribution()
     cmd = build_ext(dist)
     cmd.ext_map['foo/bar'] = ''
     res = cmd.get_ext_filename('foo')
     wanted = distutils_build_ext.get_ext_filename(cmd, 'foo')
     assert res == wanted
コード例 #10
0
ファイル: setup.py プロジェクト: zorianix/protobuf
 def get_ext_filename(self, ext_name):
     # since python3.5, python extensions' shared libraries use a suffix that corresponds to the value
     # of sysconfig.get_config_var('EXT_SUFFIX') and contains info about the architecture the library targets.
     # E.g. on x64 linux the suffix is ".cpython-XYZ-x86_64-linux-gnu.so"
     # When crosscompiling python wheels, we need to be able to override this suffix
     # so that the resulting file name matches the target architecture and we end up with a well-formed
     # wheel.
     filename = _build_ext.get_ext_filename(self, ext_name)
     orig_ext_suffix = sysconfig.get_config_var("EXT_SUFFIX")
     new_ext_suffix = os.getenv("PROTOCOL_BUFFERS_OVERRIDE_EXT_SUFFIX")
     if new_ext_suffix and filename.endswith(orig_ext_suffix):
         filename = filename[:-len(orig_ext_suffix)] + new_ext_suffix
     return filename
コード例 #11
0
ファイル: setup.py プロジェクト: eminence/OIL
    def run(self):
        # do the normal cleanup
        clean.run(self)

        # try to remove 'OIL.{so,pyd,...}' extension,
        # regardless of the current system's extension name convention
        build_ext = self.get_finalized_command("build_ext")
        fname = build_ext.get_ext_filename("OIL")
        if os.path.exists(fname):
            try:
                log.info("removing '%s'", fname)
                if not self.dry_run:
                    os.remove(fname)

            except OSError:
                log.warn("'%s' could not be cleaned -- permission denied", fname)
        else:
            log.debug("'%s' does not exist -- can't clean it", fname)
コード例 #12
0
ファイル: setup.py プロジェクト: eminence/OIL
    def run(self):
        # do the normal cleanup
        clean.run(self)

        # try to remove 'OIL.{so,pyd,...}' extension,
        # regardless of the current system's extension name convention
        build_ext = self.get_finalized_command('build_ext')
        fname = build_ext.get_ext_filename('OIL')
        if os.path.exists(fname):
            try:
                log.info("removing '%s'", fname)
                if not self.dry_run:
                    os.remove(fname)
                    
            except OSError:
                log.warn("'%s' could not be cleaned -- permission denied",
                         fname)
        else:
            log.debug("'%s' does not exist -- can't clean it",
                      fname)
コード例 #13
0
ファイル: setup.py プロジェクト: jmartign/clufter
 def get_ext_filename(self, ext_name):
     return path_splitext(build_ext.get_ext_filename(self, ext_name))[0]
コード例 #14
0
ファイル: setup.py プロジェクト: zjc5415/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     kxver = self.distribution.kxver
     return filename[:-len(so_ext)] + kxver.split('.')[0] + so_ext
コード例 #15
0
ファイル: setup.py プロジェクト: xbsd/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     kxver = self.distribution.kxver
     return filename[:-len(so_ext)] + kxver.split('.')[0] + so_ext
コード例 #16
0
 def get_ext_filename(self, ext_name):
     if self._ctypes:
         return ext_name.split('.')[-1] + '.so'
     return build_ext.get_ext_filename(self, ext_name)
コード例 #17
0
ファイル: setup.py プロジェクト: kevinarpe/kx
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     kxver = self.distribution.kxver
     return filename[:-len(so_ext)] + kxver.replace('.', '_') + so_ext
コード例 #18
0
ファイル: cross.py プロジェクト: eraldop/ae
 def get_ext_filename(self, ext_name):
     return build_ext.get_ext_filename(self, ext_name).replace(".so",".pyd")
コード例 #19
0
 def get_ext_filename(self, ext_name):
     return path_splitext(build_ext.get_ext_filename(self, ext_name))[0]
コード例 #20
0
 def get_ext_filename(self, ext_name):
     if self._ctypes:
         return ext_name.split(".")[-1] + ".so"
     return build_ext.get_ext_filename(self, ext_name)
コード例 #21
0
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     kxver = self.distribution.kxver
     return filename[:-len(so_ext)] + kxver.replace('.', '_') + so_ext
コード例 #22
0
 def get_ext_filename(self, ext_name):
     return build_ext.get_ext_filename(self,
                                       ext_name).replace(".so", ".pyd")
コード例 #23
0
ファイル: setup.py プロジェクト: lessc0de/pyq
 def get_ext_filename(self, ext_name):
     filename = _build_ext.get_ext_filename(self, ext_name)
     so_ext = get_config_var('SO')
     return filename[:-len(so_ext)] + so_ext