Skip to content

Commit

Permalink
Fix the wheel target for case insensitive file
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Dec 3, 2023
1 parent b15daaf commit d0ff5f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/hatchling/builders/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ def set_default_file_selection(self) -> None:
if self.__include or self.__exclude or self.__packages or self.__only_include:
return

# IMPORTANT: try the normalized name first for case insensitive file systems, see:
# https://github.com/pypa/hatch/issues/1054
for project_name in (
self.builder.normalize_file_name_component(self.builder.metadata.core.raw_name),
self.builder.normalize_file_name_component(self.builder.metadata.core.name),
self.builder.normalize_file_name_component(self.builder.metadata.core.raw_name),
):
if os.path.isfile(os.path.join(self.root, project_name, '__init__.py')):
self.__packages.append(project_name)
Expand Down
1 change: 1 addition & 0 deletions docs/history/hatchling.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix parsing dependencies for environments when warnings are emitted
- Properly handle non-zero version epoch for the `standard` version scheme
- Allow using an empty string for the `sources` option to add a prefix to distribution paths
- Fix the `wheel` target for case insensitive file systems when the project metadata name does not match the directory name on disk

## [1.18.0](https://github.com/pypa/hatch/releases/tag/hatchling-v1.18.0) - 2023-06-12 ## {: #hatchling-v1.18.0 }

Expand Down

0 comments on commit d0ff5f5

Please sign in to comment.