summaryrefslogtreecommitdiff
path: root/setuptools/command/bdist_egg.py
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-23 23:01:08 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-24 01:14:44 +0000
commitcbd0cb7d36689598c8cd69f06411b2785065f914 (patch)
tree6d217c7977b333002db9eedf58080f0d8c465366 /setuptools/command/bdist_egg.py
parentea6df151a0e32013dc4a82bc45ab9355842146fa (diff)
downloadpython-setuptools-git-cbd0cb7d36689598c8cd69f06411b2785065f914.tar.gz
Prefer alternative from egg_info.py to pkg_resources.Distribution.egg_name
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r--setuptools/command/bdist_egg.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py
index 11a1c6be..33f483cf 100644
--- a/setuptools/command/bdist_egg.py
+++ b/setuptools/command/bdist_egg.py
@@ -11,7 +11,6 @@ import re
import textwrap
import marshal
-from pkg_resources import get_build_platform, Distribution
from setuptools.extension import Library
from setuptools import Command
from .._path import ensure_directory
@@ -64,7 +63,7 @@ class bdist_egg(Command):
('bdist-dir=', 'b',
"temporary directory for creating the distribution"),
('plat-name=', 'p', "platform name to embed in generated filenames "
- "(default: %s)" % get_build_platform()),
+ "(by default uses `pkg_resources.get_build_platform()`)"),
('exclude-source-files', None,
"remove all .py files from the generated egg"),
('keep-temp', 'k',
@@ -98,18 +97,18 @@ class bdist_egg(Command):
self.bdist_dir = os.path.join(bdist_base, 'egg')
if self.plat_name is None:
+ from pkg_resources import get_build_platform
+
self.plat_name = get_build_platform()
self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
if self.egg_output is None:
-
# Compute filename of the output egg
- basename = Distribution(
- None, None, ei_cmd.egg_name, ei_cmd.egg_version,
- get_python_version(),
- self.distribution.has_ext_modules() and self.plat_name
- ).egg_name()
+ basename = ei_cmd._get_egg_basename(
+ py_version=get_python_version(),
+ platform=self.distribution.has_ext_modules() and self.plat_name,
+ )
self.egg_output = os.path.join(self.dist_dir, basename + '.egg')