summaryrefslogtreecommitdiff
path: root/devel/py-setuptools/files/py39/patch-setuptools_dist.py
blob: d84f76b4116233bb8a814e4cc5406097ce9a710f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- setuptools/dist.py.orig	2022-07-04 02:25:25 UTC
+++ setuptools/dist.py
@@ -777,8 +777,9 @@ class Distribution(_Distribution):
 
     def _setuptools_commands(self):
         try:
-            return metadata.distribution('setuptools').entry_points.names
-        except metadata.PackageNotFoundError:
+            dist = pkg_resources.get_distribution('setuptools')
+            return list(dist.get_entry_map('distutils.commands'))
+        except pkg_resources.DistributionNotFound:
             # during bootstrapping, distribution doesn't exist
             return []