summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2021-12-24 23:19:26 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2021-12-24 23:19:26 +0200
commit83eff2cd2ead5895ddbd8deb10096c85f22c8527 (patch)
tree57f74c030be3f72330845e560f4b7c27288bb3dd
parentea3a53aae9f437fe4dcb031561a12add2fe6942a (diff)
downloadwheel-git-83eff2cd2ead5895ddbd8deb10096c85f22c8527.tar.gz
Got rid of require_pkgresources()
Setuptools will now always be present so this is pointless. The pkg_resources module was never imported here anyway.
-rw-r--r--src/wheel/cli/__init__.py7
-rwxr-xr-xsrc/wheel/cli/convert.py5
2 files changed, 1 insertions, 11 deletions
diff --git a/src/wheel/cli/__init__.py b/src/wheel/cli/__init__.py
index 31ac4c8..e41cce5 100644
--- a/src/wheel/cli/__init__.py
+++ b/src/wheel/cli/__init__.py
@@ -7,13 +7,6 @@ import os
import sys
-def require_pkgresources(name):
- try:
- import pkg_resources # noqa: F401
- except ImportError:
- raise RuntimeError(f"'{name}' needs pkg_resources (part of setuptools).")
-
-
class WheelError(Exception):
pass
diff --git a/src/wheel/cli/convert.py b/src/wheel/cli/convert.py
index a4bec18..90afad3 100755
--- a/src/wheel/cli/convert.py
+++ b/src/wheel/cli/convert.py
@@ -9,7 +9,7 @@ from setuptools.dist import Distribution
from ..bdist_wheel import bdist_wheel
from ..wheelfile import WheelFile
-from . import WheelError, require_pkgresources
+from . import WheelError
egg_info_re = re.compile(
r"""
@@ -253,9 +253,6 @@ def wininst2wheel(path, dest_dir):
def convert(files, dest_dir, verbose):
- # Only support wheel convert if pkg_resources is present
- require_pkgresources("wheel convert")
-
for pat in files:
for installer in iglob(pat):
if os.path.splitext(installer)[1] == ".egg":