Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Dec 3, 2023
1 parent a3543cd commit 984b3fc
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions backend/src/hatchling/builders/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import hashlib
import os
import stat
import sys
import tempfile
import zipfile
from io import StringIO
Expand Down Expand Up @@ -348,15 +349,23 @@ def macos_max_compat(self) -> bool:

return self.__macos_max_compat

@staticmethod
def get_raw_fs_path_name(directory: str, name: str) -> str:
normalized = name.casefold()
entries = os.listdir(directory)
for entry in entries:
if entry.casefold() == normalized:
return entry

return name # no cov
if sys.platform in {'darwin', 'win32'}:

@staticmethod
def get_raw_fs_path_name(directory: str, name: str) -> str:
normalized = name.casefold()
entries = os.listdir(directory)
for entry in entries:
if entry.casefold() == normalized:
return entry

return name # no cov

else:

@staticmethod
def get_raw_fs_path_name(directory: str, name: str) -> str: # noqa: ARG004
return name


class WheelBuilder(BuilderInterface):
Expand Down

0 comments on commit 984b3fc

Please sign in to comment.