diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-12-27 13:56:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-27 13:56:06 -0700 |
commit | 7d0430be0712f0a02102c8637da7741eb3b948bb (patch) | |
tree | 22b6c2f417fab911f77b81e02361e209db7b18f2 | |
parent | 9c28deb7d838b6e0c171d54bb6a2a8e5498c9a5c (diff) | |
parent | 9b3f65096ee6bee277552da987ce296985baa96d (diff) | |
download | numpy-7d0430be0712f0a02102c8637da7741eb3b948bb.tar.gz |
Merge pull request #18042 from charris/testing
MAINT: Add dist_info to "other" setup.py commands.
-rwxr-xr-x | setup.py | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -245,7 +245,8 @@ def parse_setuppy_commands(): '--maintainer', '--maintainer-email', '--contact', '--contact-email', '--url', '--license', '--description', '--long-description', '--platforms', '--classifiers', - '--keywords', '--provides', '--requires', '--obsoletes'] + '--keywords', '--provides', '--requires', '--obsoletes', + 'version',] for command in info_commands: if command in args: @@ -256,8 +257,7 @@ def parse_setuppy_commands(): # below and not standalone. Hence they're not added to good_commands. good_commands = ('develop', 'sdist', 'build', 'build_ext', 'build_py', 'build_clib', 'build_scripts', 'bdist_wheel', 'bdist_rpm', - 'bdist_wininst', 'bdist_msi', 'bdist_mpkg', 'build_src', - 'version') + 'bdist_wininst', 'bdist_msi', 'bdist_mpkg', 'build_src',) for command in good_commands: if command in args: @@ -345,17 +345,13 @@ def parse_setuppy_commands(): # Commands that do more than print info, but also don't need Cython and # template parsing. - other_commands = ['egg_info', 'install_egg_info', 'rotate'] + other_commands = ['egg_info', 'install_egg_info', 'rotate', 'dist_info'] for command in other_commands: if command in args: return False # If we got here, we didn't detect what setup.py command was given - import warnings - warnings.warn("Unrecognized setuptools command, proceeding with " - "generating Cython sources and expanding templates", - stacklevel=2) - return True + raise RuntimeError("Unrecognized setuptools command: {}".format(args)) def get_docs_url(): @@ -421,7 +417,7 @@ def setup_package(): # Raise errors for unsupported commands, improve help output, etc. run_build = parse_setuppy_commands() - if run_build and 'version' not in sys.argv: + if run_build: # patches distutils, even though we don't use it #from setuptools import setup from numpy.distutils.core import setup |