Skip to content

Commit

Permalink
fix sdist detection
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed Aug 26, 2024
1 parent ab6eaac commit 0121567
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions plugins/hatch/hatch_una/hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def initialize(self, version: str, build_data: dict[str, Any]) -> None:
# this is fine, the package doesn't import anything internally
return

via_sdist = Path("PKG-INFO").exists()
if via_sdist:
# nothing to do as everything should already be included in sdist...
return

# make sure all int_deps exist
found = [Path(k) for k in int_deps if (path / k).exists()]
missing = set(int_deps) - set(str(p) for p in found)
Expand Down
10 changes: 5 additions & 5 deletions plugins/pdm/pdm_una/include.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def force_include(context: Context) -> None:
except KeyError as e:
raise KeyError(f"Package '{name}' is missing '[tool.una.deps]' in pyproject.toml") from e

via_sdist = True
if via_sdist:
# nothing to do as everything should already be included in sdist...
raise ValueError("FIX THIS") # TODO fix this

if not int_deps:
# this is fine, the package doesn't import anything internally
return

via_sdist = Path("PKG-INFO").exists()
if via_sdist:
# nothing to do as everything should already be included in sdist...
return

# make sure all int_deps exist
found = [Path(k) for k in int_deps if (path / k).exists()]
missing = set(int_deps) - set(str(p) for p in found)
Expand Down

0 comments on commit 0121567

Please sign in to comment.