Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Because distutils sucks, it just copies the entire contents of the build
results dir (e.g. build/lib.linux-i686-2.6) during installation. That means
that we can't put any files there that we don't want to distribute.

To deal with it, this code will compile test extensions inplace, but
will use a separate directory for build files. This way testing with
multiple Python release and pydebug versions works and test extensions
are not distributed.

        def build_test_extensions():
    """Because distutils sucks, it just copies the entire contents of the build
    results dir (e.g. build/lib.linux-i686-2.6) during installation. That means
    that we can't put any files there that we don't want to distribute.

    To deal with it, this code will compile test extensions inplace, but
    will use a separate directory for build files. This way testing with
    multiple Python release and pydebug versions works and test extensions
    are not distributed.
    """
    from my_build_ext import build_ext
    setup(
        options={
            'build': {'build_base': os.path.join('build', 'tests')},
        },
        cmdclass=dict(build_ext=build_ext),
        script_args=['-q', 'build_ext', '-q'],
        ext_modules=TEST_EXTENSIONS + TEST_EXTENSIONS_CPP)
        


src/g/r/greenlet-0.4.2/conftest.py   greenlet(Download)
    spawn(cmd, search_path=0)
 
    from tests import build_test_extensions
    build_test_extensions()