diff --git a/numpy/distutils/command/egg_info.py b/numpy/distutils/command/egg_info.py index b7104de5be40..972a27df3846 100644 --- a/numpy/distutils/command/egg_info.py +++ b/numpy/distutils/command/egg_info.py @@ -1,9 +1,17 @@ from __future__ import division, absolute_import, print_function +import sys + from setuptools.command.egg_info import egg_info as _egg_info class egg_info(_egg_info): def run(self): + if 'sdist' in sys.argv: + import warnings + warnings.warn("`build_src` is being run, this may lead to missing " + "files in your sdist! See numpy issue gh-7127 for " + "details", UserWarning) + # We need to ensure that build_src has been executed in order to give # setuptools' egg_info command real filenames instead of functions which # generate files. diff --git a/setup.py b/setup.py index ded914b11dc4..276d7e5ead30 100755 --- a/setup.py +++ b/setup.py @@ -188,7 +188,7 @@ def check_submodules(): raise ValueError('Submodule not clean: %s' % line) -from setuptools.command.sdist import sdist +from distutils.command.sdist import sdist class sdist_checked(sdist): """ check submodules on sdist to prevent incomplete tarballs """ def run(self):