summaryrefslogtreecommitdiff
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-24 10:35:45 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-24 10:57:27 +0000
commit33f3243c8256742112bec48d1f34c61ddbfb95be (patch)
treedb3329f27236868e4a461d76f660375d67acad4a /setuptools/command/egg_info.py
parent5e7b76f786e8a8fbfc3bfa4755033a8d9c2e06d8 (diff)
downloadpython-setuptools-git-33f3243c8256742112bec48d1f34c61ddbfb95be.tar.gz
Fix dist-info naming discrepancy in relation to bdist_wheel
Diffstat (limited to 'setuptools/command/egg_info.py')
-rw-r--r--setuptools/command/egg_info.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 2314b448..30ecf1dd 100644
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -234,7 +234,7 @@ class egg_info(InfoCommon, Command):
self.egg_base = (dirs or {}).get('', os.curdir)
self.ensure_dirname('egg_base')
- self.egg_info = _filename_component(self.egg_name) + '.egg-info'
+ self.egg_info = _normalization.filename_component(self.egg_name) + '.egg-info'
if self.egg_base != os.curdir:
self.egg_info = os.path.join(self.egg_base, self.egg_info)
if '-' in self.egg_name:
@@ -778,17 +778,13 @@ def get_pkg_info_revision():
def _egg_basename(egg_name, egg_version, py_version=PY_MAJOR, platform=None):
"""Compute filename of the output egg. Private API."""
- name = _filename_component(egg_name)
- version = _filename_component(egg_version)
+ name = _normalization.filename_component(egg_name)
+ version = _normalization.filename_component(egg_version)
egg = f"{name}-{version}-py{py_version}"
if platform:
egg += f"-{platform}"
return egg
-def _filename_component(value):
- return value.replace("-", "_")
-
-
class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning):
"""Deprecated behavior warning for EggInfo, bypassing suppression."""