python类run()的实例源码

setup.py 文件源码 项目:atropos 作者: jdidion 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def out_of_date(extensions):
    """
    Check whether any pyx source is newer than the corresponding generated
    C source or whether any C source is missing.
    """
    for extension in extensions:
        for pyx in extension.sources:
            path, ext = os.path.splitext(pyx)
            if ext not in ('.pyx', '.py'):
                continue
            if extension.language == 'c++':
                csource = path + '.cpp'
            else:
                csource = path + '.c'
            # When comparing modification times, allow five seconds slack:
            # If the installation is being run from pip, modification
            # times are not preserved and therefore depends on the order in
            # which files were unpacked.
            if not os.path.exists(csource) or (
                os.path.getmtime(pyx) > os.path.getmtime(csource) + 5):
                return True
    return False
setup.py 文件源码 项目:coincurve 作者: ofek 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def run(self):
        if self.distribution.has_c_libraries():
            _build_clib = self.get_finalized_command('build_clib')
            self.include_dirs.append(
                os.path.join(_build_clib.build_clib, 'include'),
            )
            self.include_dirs.extend(_build_clib.build_flags['include_dirs'])

            self.library_dirs.append(
                os.path.join(_build_clib.build_clib, 'lib'),
            )
            self.library_dirs.extend(_build_clib.build_flags['library_dirs'])

            self.define = _build_clib.build_flags['define']

        return _build_ext.run(self)
setup.py 文件源码 项目:pytest-cython 作者: lgpage 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def run(self):
            try:
                build_ext.run(self)
            except Exception as e:
                self._unavailable(e)
                self.extensions = []  # avoid copying missing files (it would fail).
setup.py 文件源码 项目:deb-python-cassandra-driver 作者: openstack 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def run(self):
        try:
            self._setup_extensions()
            build_ext.run(self)
        except DistutilsPlatformError as exc:
            sys.stderr.write('%s\n' % str(exc))
            warnings.warn(self.error_message % "C extensions.")
setup.py 文件源码 项目:yarl 作者: aio-libs 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except (DistutilsPlatformError, FileNotFoundError):
            raise BuildFailed()
setup.py 文件源码 项目:piqueserver 作者: piqueserver 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def run(self):

        from Cython.Build import cythonize

        compiler_directives = {}
        if linetrace:
            compiler_directives['linetrace'] = True

        self.extensions = cythonize(self.extensions, compiler_directives=compiler_directives)

        _build_ext.run(self)

        run_setup(os.path.join(os.getcwd(), "setup.py"),
                  ['build_py'] + extra_args)
setup.py 文件源码 项目:cbor_py 作者: brianolson 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            raise BuildError()
setup.py 文件源码 项目:yosai_libauthz 作者: YosaiProject 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def run(self):
        os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info ./target; py.cleanup -d')
setup.py 文件源码 项目:yosai_libauthz 作者: YosaiProject 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def run(self):
        build_py.run(self)
        build_yosai_libauthz(os.path.join(self.build_lib, *PACKAGE.split('.')))
setup.py 文件源码 项目:yosai_libauthz 作者: YosaiProject 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def run(self):
        build_ext.run(self)
        if self.inplace:
            build_py = self.get_finalized_command('build_py')
            build_yosai_libauthz(build_py.get_package_dir(PACKAGE))
setup.py 文件源码 项目:apm-agent-python 作者: elastic 项目源码 文件源码 阅读 189 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            raise BuildExtFailed()
setup.py 文件源码 项目:backpack 作者: sdispater 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            raise BuildExtFailed()
setup.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            raise BuildFailed()
setup.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def run(self):
        import sys, subprocess
        raise SystemExit(
            subprocess.call([sys.executable,
                             # Turn on deprecation warnings
                             '-Wd',
                             'simplejson/tests/__init__.py']))
setup.py 文件源码 项目:pendulum 作者: sdispater 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except (DistutilsPlatformError, FileNotFoundError):
            raise BuildFailed()
setup.py 文件源码 项目:ms_deisotope 作者: mobiusklein 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            traceback.print_exc()
            raise BuildFailed()
setup.py 文件源码 项目:atropos 作者: jdidion 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def run(self):
        # If we encounter a PKG-INFO file, then this is likely a .tar.gz/.zip
        # file retrieved from PyPI that already includes the pre-cythonized
        # extension modules, and then we do not need to run cythonize().
        if os.path.exists('PKG-INFO'):
            no_cythonize(extensions)
        else:
            # Otherwise, this is a 'developer copy' of the code, and then the
            # only sensible thing is to require Cython to be installed.
            check_cython_version()
            from Cython.Build import cythonize
            self.extensions = cythonize(self.extensions)
        _build_ext.run(self)
setup.py 文件源码 项目:atropos 作者: jdidion 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def run(self):
        # Make sure the compiled Cython files in the distribution are up-to-date
        from Cython.Build import cythonize
        check_cython_version()
        cythonize(extensions)
        versioneer_sdist.run(self)
setup.py 文件源码 项目:deb-python-wrapt 作者: openstack 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            raise BuildExtFailed()
setup.py 文件源码 项目:multidict 作者: aio-libs 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except (DistutilsPlatformError, FileNotFoundError):
            raise BuildFailed()
setup.py 文件源码 项目:annotated-py-tornado 作者: hhstore 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except Exception:
            e = sys.exc_info()[1]
            sys.stdout.write('%s\n' % str(e))
            warnings.warn(self.warning_message % ("Extension modules",
                                                  "There was an issue with "
                                                  "your platform configuration"
                                                  " - see above."))
setup.py 文件源码 项目:influxgraph 作者: InfluxGraph 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except DistutilsPlatformError:
            raise BuildFailed()
setup.py 文件源码 项目:aredis 作者: NoneGG 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except Exception:
            e = sys.exc_info()[1]
            sys.stdout.write('%s\n' % str(e))
            warnings.warn(self.warning_message % ("Extension modules",
                                                  "There was an issue with "
                                                  "your platform configuration"
                                                  " - see above."))
setup.py 文件源码 项目:giraffez 作者: capitalone 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def run(self):
        # Disabling parallel build for now. It causes issues on multiple
        # platforms with concurrent file access causing odd build errors
        #self.parallel = multiprocessing.cpu_count()
        build_ext.run(self)
setup.py 文件源码 项目:aweasome_learning 作者: Knight-ZXW 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except Exception:
            e = sys.exc_info()[1]
            sys.stdout.write('%s\n' % str(e))
            warnings.warn(self.warning_message % ("Extension modules",
                                                  "There was an issue with "
                                                  "your platform configuration"
                                                  " - see above."))
setup.py 文件源码 项目:durotar 作者: markgao 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except Exception:
            e = sys.exc_info()[1]
            sys.stdout.write("%s\n" % (str(e),))
            warnings.warn(self.warning_message % ("Extension modules",
                                                  "There was an issue with "
                                                  "your platform configuration"
                                                  " - see above."))
setup.py 文件源码 项目:browser_vuln_check 作者: lcatro 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def run(self):
        try:
            build_ext.run(self)
        except Exception:
            e = sys.exc_info()[1]
            sys.stdout.write('%s\n' % str(e))
            warnings.warn(self.warning_message % ("Extension modules",
                                                  "There was an issue with "
                                                  "your platform configuration"
                                                  " - see above."))
setup.py 文件源码 项目:coincurve 作者: ofek 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def run(self):
        # Ensure library has been downloaded (sdist might have been skipped)
        download_library(self)

        _egg_info.run(self)
setup.py 文件源码 项目:coincurve 作者: ofek 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def run(self):
        download_library(self)
        _sdist.run(self)
setup.py 文件源码 项目:coincurve 作者: ofek 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def run(self):
            download_library(self)
            _bdist_wheel.run(self)


问题


面经


文章

微信
公众号

扫码关注公众号