Skip to content

Commit 942174e

Browse files
authored
fix: entrypoints.txt should be entry_points.txt (#161)
This fixes the `entry_points`, including `[project.scripts]`.
1 parent c18f38c commit 942174e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/scikit_build_core/build/wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _write_wheel_metadata(
7979
dist_info.mkdir(exist_ok=False)
8080
with dist_info.joinpath("METADATA").open("wb") as f:
8181
f.write(bytes(metadata.as_rfc822()))
82-
with dist_info.joinpath("entrypoints.txt").open("w", encoding="utf_8") as f:
82+
with dist_info.joinpath("entry_points.txt").open("w", encoding="utf_8") as f:
8383
ep = metadata.entrypoints.copy()
8484
ep["console_scripts"] = metadata.scripts
8585
ep["gui_scripts"] = metadata.gui_scripts

tests/packages/simple_pyproject_ext/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ requires-python = ">=3.7"
1414
test = ["pytest>=6.0"]
1515

1616
[project.scripts]
17-
something = "other"
17+
something = "other:callme"
1818

1919
[project.gui-scripts]
2020
guithing = "a.b:c"

tests/test_pyproject_pep517.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ def test_pep517_sdist_hash(tmp_path, monkeypatch):
7878
hash = hashlib.sha256(sdist.read_bytes()).hexdigest()
7979
if sys.version_info < (3, 9):
8080
assert (
81-
hash == "600ed996e51642027557759ee9eeb31b5cae1f443313f5f7d0a40d9cc9cbdd13"
81+
hash == "3b4af3fbe3d4505415bb1e55bb2e49902f4633d371ae7288007d90eb1488bc4d"
8282
)
8383
else:
8484
assert (
85-
hash == "4f47a4e797db1cb8e15afb368360d5f2ac5ae4b6c7e38e0771f8eba65fab65e4"
85+
hash == "d373b8458ee37b176cfd03f0f3199b30fdb034bca465b2826392a6c3af85ca4c"
8686
)
8787

8888

@@ -156,11 +156,11 @@ def each_unignored_file_ordered(*args, **kwargs):
156156
hash = hashlib.sha256(sdist.read_bytes()).hexdigest()
157157
if sys.version_info < (3, 9):
158158
assert (
159-
hash == "505cb72c11e9b8344e6d467aef94f3e96d66d1c618a0703e4fcdbb623f28c23c"
159+
hash == "99d54d3090f932f00b77f01d12d422aacb674a6a9afd6af24f7afaaab7c3082b"
160160
)
161161
else:
162162
assert (
163-
hash == "68703d101d8185d86ec7496285ddf46e302166c60a10372682de82f70bba847a"
163+
hash == "359e38eb01415440cc8f7d9ee09612d625b8906ca09cd08c9d56f3eb972b0110"
164164
)
165165

166166

@@ -182,7 +182,7 @@ def test_pep517_wheel(tmp_path, monkeypatch, virtualenv):
182182
file_names = [p.name for p in p.iterdir()]
183183
metadata = p.joinpath("cmake_example-0.0.1.dist-info/METADATA").read_text()
184184
entry_points = p.joinpath(
185-
"cmake_example-0.0.1.dist-info/entrypoints.txt"
185+
"cmake_example-0.0.1.dist-info/entry_points.txt"
186186
).read_text()
187187

188188
assert len(file_names) == 2

tests/test_pyproject_pep518.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def test_pep518_sdist():
3939
if sys.version_info < (3, 9):
4040
assert (
4141
hash
42-
== "600ed996e51642027557759ee9eeb31b5cae1f443313f5f7d0a40d9cc9cbdd13"
42+
== "3b4af3fbe3d4505415bb1e55bb2e49902f4633d371ae7288007d90eb1488bc4d"
4343
)
4444
else:
4545
assert (
4646
hash
47-
== "4f47a4e797db1cb8e15afb368360d5f2ac5ae4b6c7e38e0771f8eba65fab65e4"
47+
== "d373b8458ee37b176cfd03f0f3199b30fdb034bca465b2826392a6c3af85ca4c"
4848
)
4949

5050
with tarfile.open(sdist) as f:

0 commit comments

Comments
 (0)