Commit 537e0287 authored by Ralf Schmitt's avatar Ralf Schmitt

call make when building sdist in setup.py

we do this by using a custom sdist class. it's also called sdist as
the classname is also used for the warning message about the missing
README.txt and I didn't want to change that.
parent 786ae5f2
...@@ -12,6 +12,7 @@ try: ...@@ -12,6 +12,7 @@ try:
except ImportError: except ImportError:
from distutils.core import Extension, setup from distutils.core import Extension, setup
from distutils.command.build_ext import build_ext from distutils.command.build_ext import build_ext
from distutils.command.sdist import sdist as _sdist
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError, IOError) ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError, IOError)
...@@ -132,6 +133,10 @@ def make(done=[]): ...@@ -132,6 +133,10 @@ def make(done=[]):
sys.exit(1) sys.exit(1)
done.append(1) done.append(1)
class sdist(_sdist):
def run(self):
make()
_sdist.run(self)
class my_build_ext(build_ext): class my_build_ext(build_ext):
...@@ -200,7 +205,7 @@ def run_setup(ext_modules): ...@@ -200,7 +205,7 @@ def run_setup(ext_modules):
url='http://www.gevent.org/', url='http://www.gevent.org/',
packages=['gevent'], packages=['gevent'],
ext_modules=ext_modules, ext_modules=ext_modules,
cmdclass={'build_ext': my_build_ext}, cmdclass=dict(build_ext=my_build_ext, sdist=sdist),
install_requires=['greenlet'], install_requires=['greenlet'],
classifiers=[ classifiers=[
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
......
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