diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-04-13 10:04:53 +0100 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-06-15 16:43:42 +0100 |
commit | c6106b7b5eac56f6f84174ede07aa221d5aa635d (patch) | |
tree | 9bf1fc9a11da707f4370380e2a4df379263a6699 /setuptools/command | |
parent | e36951eb0afaf61a845672d060324ab3e90190d1 (diff) | |
download | python-setuptools-git-c6106b7b5eac56f6f84174ede07aa221d5aa635d.tar.gz |
Add dist_info_dir param to dist_info command
Diffstat (limited to 'setuptools/command')
-rw-r--r-- | setuptools/command/dist_info.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/setuptools/command/dist_info.py b/setuptools/command/dist_info.py index ca540ad1..5e38c96c 100644 --- a/setuptools/command/dist_info.py +++ b/setuptools/command/dist_info.py @@ -24,23 +24,24 @@ class dist_info(Command): def initialize_options(self): self.egg_base = None + self.dist_info_dir = None def finalize_options(self): - pass - - def run(self): egg_info = self.get_finalized_command('egg_info') egg_info.egg_base = self.egg_base egg_info.finalize_options() - egg_info.run() name = _safe(self.distribution.get_name()) - version = _version(self.distribution.get_version()) base = self.egg_base or os.curdir - dist_info_dir = os.path.join(base, f"{name}-{version}.dist-info") - log.info("creating '{}'".format(os.path.abspath(dist_info_dir))) + version = _version(self.distribution.get_version()) + self.dist_info_dir = os.path.join(base, f"{name}-{version}.dist-info") + self.egg_info = egg_info + self.egg_base = egg_info.egg_base + def run(self): + self.egg_info.run() + log.info("creating '{}'".format(os.path.abspath(self.dist_info_dir))) bdist_wheel = self.get_finalized_command('bdist_wheel') - bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir) + bdist_wheel.egg2dist(self.egg_info.egg_info, self.dist_info_dir) def _safe(component: str) -> str: |