diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2019-01-27 10:02:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 10:02:52 -0500 |
commit | 0551421f082eea3f633bc6be23c16a04483aca98 (patch) | |
tree | 76c5b37e3a56a232b4b5b66ab7e933edbe64cd25 /setuptools/monkey.py | |
parent | 28872fc9e7d15a1acf3bc557795c76c5e64dbad3 (diff) | |
parent | 78fd73026ad7284819936b651f7cfbe8a1ec98c8 (diff) | |
download | external_python_setuptools-0551421f082eea3f633bc6be23c16a04483aca98.tar.gz external_python_setuptools-0551421f082eea3f633bc6be23c16a04483aca98.tar.bz2 external_python_setuptools-0551421f082eea3f633bc6be23c16a04483aca98.zip |
Merge branch 'master' into license-fix-357
Diffstat (limited to 'setuptools/monkey.py')
-rw-r--r-- | setuptools/monkey.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 05a738b0..3c77f8cf 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -84,7 +84,7 @@ def patch_all(): warehouse = 'https://upload.pypi.org/legacy/' distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse - _patch_distribution_metadata_write_pkg_file() + _patch_distribution_metadata() # Install Distribution throughout the distutils for module in distutils.dist, distutils.core, distutils.cmd: @@ -101,11 +101,11 @@ def patch_all(): patch_for_msvc_specialized_compiler() -def _patch_distribution_metadata_write_pkg_file(): - """Patch write_pkg_file to also write Requires-Python/Requires-External""" - distutils.dist.DistributionMetadata.write_pkg_file = ( - setuptools.dist.write_pkg_file - ) +def _patch_distribution_metadata(): + """Patch write_pkg_file and read_pkg_file for higher metadata standards""" + for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'): + new_val = getattr(setuptools.dist, attr) + setattr(distutils.dist.DistributionMetadata, attr, new_val) def patch_func(replacement, target_mod, func_name): |