diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-12-10 11:58:47 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2020-12-10 11:58:47 -0700 |
commit | fed2509471e77e0357c5252e69fc6159881f6cb2 (patch) | |
tree | 6823964aa7c72e836f6f7defe996b4658856439c /setup.py | |
parent | d06d38c10080ebdbc928e69131116e6a9d45100d (diff) | |
download | numpy-fed2509471e77e0357c5252e69fc6159881f6cb2.tar.gz |
BUG: Make sdist use distutils.
If sdist uses setuptools there can be problems, see gh-7127.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -60,8 +60,10 @@ if os.path.exists('MANIFEST'): os.remove('MANIFEST') # We need to import setuptools here in order for it to persist in sys.modules. -# Its presence/absence is used in subclassing setup in numpy/distutils/core.py, -# which may not be the most robust design. +# Its presence/absence is used in subclassing setup in numpy/distutils/core.py. +# However, we need to run the distutils version of sdist, so import that first +# so that it is in sys.modules +import numpy.distutils.command.sdist import setuptools # Initialize cmdclass from versioneer @@ -158,13 +160,14 @@ class concat_license_files(): f.write(self.bsd_text) -sdist_class = cmdclass['sdist'] -class sdist_checked(sdist_class): +# Need to inherit from versioneer version of sdist to get the encoded +# version information. +class sdist_checked(cmdclass['sdist']): """ check submodules on sdist to prevent incomplete tarballs """ def run(self): check_submodules() with concat_license_files(): - sdist_class.run(self) + super().run() def get_build_overrides(): |