summaryrefslogtreecommitdiff
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-02-05 09:55:05 -0500
committerJason R. Coombs <jaraco@jaraco.com>2022-02-05 09:55:05 -0500
commit157e36ed63408713f56e16f25c5f813e82bb7442 (patch)
treecd380949bfbe99a094c70c97e829dad54c4364a3 /setuptools/command/egg_info.py
parent73e08a8acd3038a79ef37c0e5769d934d609f6c7 (diff)
downloadpython-setuptools-git-157e36ed63408713f56e16f25c5f813e82bb7442.tar.gz
Replace use of parse_requirements with simple constructor.
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 f2210292..379f9398 100644
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -23,7 +23,7 @@ from setuptools.command.sdist import walk_revctrl
from setuptools.command.setopt import edit_config
from setuptools.command import bdist_egg
from pkg_resources import (
- parse_requirements, safe_name, parse_version,
+ Requirement, safe_name, parse_version,
safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
import setuptools.unicode_utils as unicode_utils
from setuptools.glob import glob
@@ -205,12 +205,8 @@ class egg_info(InfoCommon, Command):
try:
is_version = isinstance(parsed_version, packaging.version.Version)
- spec = (
- "%s==%s" if is_version else "%s===%s"
- )
- list(
- parse_requirements(spec % (self.egg_name, self.egg_version))
- )
+ spec = "%s==%s" if is_version else "%s===%s"
+ Requirement(spec % (self.egg_name, self.egg_version))
except ValueError as e:
raise distutils.errors.DistutilsOptionError(
"Invalid distribution name or version syntax: %s-%s" %