Commit f5a0cdd5 authored by Denis Bilenko's avatar Denis Bilenko

setup.py: make sdist do Makefile->Makefile.ext rename

parent 9439582f
......@@ -179,9 +179,18 @@ def make(done=[]):
class sdist(_sdist):
def run(self):
make()
_sdist.run(self)
renamed = False
if os.path.exists('Makefile'):
make()
os.rename('Makefile', 'Makefile.ext')
renamed = True
try:
return _sdist.run(self)
finally:
if renamed:
os.rename('Makefile.ext', 'Makefile')
class my_build_ext(build_ext):
......
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