Skip to content

Commit

Permalink
Update for whey 0.0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 26, 2024
1 parent 449a8ff commit a5af643
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dom-toml>=0.4.0
whey>=0.0.15
whey>=0.0.25
2 changes: 1 addition & 1 deletion tests/test_whey_pth_/test_build_additional_files.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_whey_pth_/test_build_complete_COMPLETE_A_.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_whey_pth_/test_build_complete_COMPLETE_B_.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_whey_pth_/test_build_complete_WHEY_NO_PTH_.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: whey
Version: 2021.0.0
Summary: A simple Python wheel builder for simple projects.
Expand Down
19 changes: 15 additions & 4 deletions whey_pth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# 3rd party
import dom_toml
from dom_toml.parser import TOML_TYPES, AbstractConfigParser, BadConfigError
from whey import additional_files
from whey.builder import WheelBuilder

__author__: str = "Dominic Davis-Foster"
Expand Down Expand Up @@ -121,7 +122,10 @@ def parse_pth_content(self, config: Dict[str, TOML_TYPES]) -> str:

return pth_content

def parse_additional_wheel_files(self, config: Dict[str, TOML_TYPES]) -> List[str]:
def parse_additional_wheel_files(
self,
config: Dict[str, TOML_TYPES],
) -> List[additional_files.AdditionalFilesEntry]:
"""
Parse the ``additional-wheel-files`` key.
Expand All @@ -131,12 +135,19 @@ def parse_additional_wheel_files(self, config: Dict[str, TOML_TYPES]) -> List[st
:param config: The unparsed TOML config for the ``[tool.whey-pth]`` table.
"""

additional_files = config["additional-wheel-files"]
entries = config["additional-wheel-files"]

for idx, file in enumerate(additional_files):
for idx, file in enumerate(entries):
self.assert_indexed_type(file, str, ["tool", "whey", "additional-wheel-files"], idx=idx)

return additional_files
parsed_additional_files = []

for entry in entries:
parsed_entry = additional_files.from_entry(entry)
if parsed_entry is not None:
parsed_additional_files.append(parsed_entry)

return parsed_additional_files

@property
def keys(self) -> List[str]:
Expand Down

0 comments on commit a5af643

Please sign in to comment.