Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate ci issue #9

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion setuptools/_vendor/importlib_metadata/compat/py39.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ def normalized_name(dist: Distribution) -> Optional[str]:
return dist._normalized_name
except AttributeError:
from .. import Prepared # -> delay to prevent circular imports.

print("V=================V")
print(f"{dist=!s}")
print(f"{getattr(dist, 'name', 'no name')=}")
print(f"{dist.metadata=!s}")
print(f"{dist.files=!s}")
print(f"{getattr(dist, 'origin', 'no origin')=!s}")
print(f"{dist.entry_points=!s}")
print("A=================A")
return Prepared.normalize(getattr(dist, "name", None) or dist.metadata['Name'])


Expand Down
26 changes: 13 additions & 13 deletions setuptools/command/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ def finalize_options(self) -> None:
bdist_base = self.get_finalized_command("bdist").bdist_base
self.bdist_dir = os.path.join(bdist_base, "wheel")

if self.dist_info_dir is None:
egg_info = cast(egg_info_cls, self.distribution.get_command_obj("egg_info"))
egg_info.ensure_finalized() # needed for correct `wheel_dist_name`
# if self.dist_info_dir is None:
egg_info = cast(egg_info_cls, self.distribution.get_command_obj("egg_info"))
egg_info.ensure_finalized() # needed for correct `wheel_dist_name`

self.data_dir = self.wheel_dist_name + ".data"
self.plat_name_supplied = bool(self.plat_name)
Expand Down Expand Up @@ -456,16 +456,16 @@ def run(self):
f"{safer_version(self.distribution.get_version())}.dist-info"
)
distinfo_dir = os.path.join(self.bdist_dir, distinfo_dirname)
if self.dist_info_dir:
# Use the given dist-info directly.
log.debug(f"reusing {self.dist_info_dir}")
shutil.copytree(self.dist_info_dir, distinfo_dir)
# Egg info is still generated, so remove it now to avoid it getting
# copied into the wheel.
shutil.rmtree(self.egginfo_dir)
else:
# Convert the generated egg-info into dist-info.
self.egg2dist(self.egginfo_dir, distinfo_dir)
# if self.dist_info_dir:
# # Use the given dist-info directly.
# log.debug(f"reusing {self.dist_info_dir}")
# shutil.copytree(self.dist_info_dir, distinfo_dir)
# # Egg info is still generated, so remove it now to avoid it getting
# # copied into the wheel.
# shutil.rmtree(self.egginfo_dir)
# else:
# Convert the generated egg-info into dist-info.
self.egg2dist(self.egginfo_dir, distinfo_dir)

self.write_wheelfile(distinfo_dir)

Expand Down
Loading