Commit 5c7abd5d authored by Stefan Behnel's avatar Stefan Behnel

Make the setup.py script importable to enable multiprocessing builds that need...

Make the setup.py script importable to enable multiprocessing builds that need to "spawn" processes (usually on Windows).
parent 4478f22f
......@@ -188,15 +188,10 @@ try:
except ValueError:
compile_cython_itself = True
if compile_cython_itself and (is_cpython or cython_compile_more):
compile_cython_modules(cython_profile, cython_compile_more, cython_with_refnanny)
setup_args.update(setuptools_extra_args)
from Cython import __version__ as version
def dev_status():
def dev_status(version):
if 'b' in version or 'c' in version:
# 1b1, 1beta1, 2rc1, ...
return 'Development Status :: 4 - Beta'
......@@ -224,7 +219,13 @@ packages = [
'pyximport',
]
setup(
def run_build():
if compile_cython_itself and (is_cpython or cython_compile_more):
compile_cython_modules(cython_profile, cython_compile_more, cython_with_refnanny)
from Cython import __version__ as version
setup(
name='Cython',
version=version,
url='https://cython.org/',
......@@ -257,7 +258,7 @@ setup(
"""),
license='Apache',
classifiers=[
dev_status(),
dev_status(version),
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
......@@ -283,4 +284,8 @@ setup(
packages=packages,
py_modules=["cython"],
**setup_args
)
)
if __name__ == '__main__':
run_build()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment