Merge pull request #7305 from chrahunt/maint/deprecate-non-egg-info-legacy-builds

Deprecate setup.py-based builds that do not make .egg-info
This commit is contained in:
Christopher Hunt 2019-11-09 09:58:43 +08:00 committed by GitHub
commit c21fd4a70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

1
news/6998.removal Normal file
View File

@ -0,0 +1 @@
Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory.

View File

@ -29,6 +29,7 @@ from pip._internal.operations.build.metadata_legacy import \
from pip._internal.pyproject import load_pyproject_toml, make_pyproject_path
from pip._internal.req.req_uninstall import UninstallPathSet
from pip._internal.utils.compat import native_str
from pip._internal.utils.deprecation import deprecated
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.logging import indent_log
from pip._internal.utils.marker_files import (
@ -941,10 +942,21 @@ class InstallRequirement(object):
egg_info_dir = prepend_root(directory)
break
else:
logger.warning(
'Could not find .egg-info directory in install record'
' for %s',
self,
deprecated(
reason=(
"{} did not indicate that it installed an "
".egg-info directory. Only setup.py projects "
"generating .egg-info directories are supported."
).format(self),
replacement=(
"for maintainers: updating the setup.py of {0}. "
"For users: contact the maintainers of {0} to let "
"them know to update their setup.py.".format(
self.name
)
),
gone_in="20.2",
issue=6998,
)
# FIXME: put the record somewhere
return