1
0

egg_info.py 987 B

123456789101112131415161718192021222324252627
  1. from __future__ import division, absolute_import, print_function
  2. import sys
  3. from setuptools.command.egg_info import egg_info as _egg_info
  4. class egg_info(_egg_info):
  5. def run(self):
  6. if 'sdist' in sys.argv:
  7. import warnings
  8. import textwrap
  9. msg = textwrap.dedent("""
  10. `build_src` is being run, this may lead to missing
  11. files in your sdist! You want to use distutils.sdist
  12. instead of the setuptools version:
  13. from distutils.command.sdist import sdist
  14. cmdclass={'sdist': sdist}"
  15. See numpy's setup.py or gh-7131 for details.""")
  16. warnings.warn(msg, UserWarning, stacklevel=2)
  17. # We need to ensure that build_src has been executed in order to give
  18. # setuptools' egg_info command real filenames instead of functions which
  19. # generate files.
  20. self.run_command("build_src")
  21. _egg_info.run(self)