Skip to content

Commit c581e75

Browse files
committed
Fixup RECORD encoding for Windows.
1 parent 038b0d8 commit c581e75

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## 0.32.2
4+
5+
This release fixes the dev-cmd wheel `RECORD` metadata to be Windows compatible.
6+
37
## 0.32.1
48

59
This release fixes the dev-cmd wheel `RECORD` metadata to include the embedded `pylock.toml` lock.

build-backend/dev_cmd_build/setuptools/build.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,14 @@ def build_wheel(
9494
b"="
9595
)
9696
pylock_toml_dest: str | None = str(pylock_toml.relative_to(tmpdir).as_posix())
97-
with (tmpdir / dist_info_dir_name / "RECORD").open(mode="a") as fp:
98-
csv.writer(fp).writerow(
99-
(pylock_toml_dest, f"sha256={fingerprint.decode('ascii')}", len(pylock_toml_data))
100-
)
97+
record = tmpdir / dist_info_dir_name / "RECORD"
98+
with record.open() as fp:
99+
record_entries = list(csv.reader(fp))
100+
record_entries.append(
101+
[pylock_toml_dest, f"sha256={fingerprint.decode('ascii')}", len(pylock_toml_data)]
102+
)
103+
with (tmpdir / dist_info_dir_name / "RECORD").open(mode="w") as fp:
104+
csv.writer(fp).writerows(sorted(record_entries))
101105

102106
with zipfile.ZipFile(wheel_path, "w") as zf:
103107
for path in original_contents:

dev_cmd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright 2024 John Sirois.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

4-
__version__ = "0.32.1"
4+
__version__ = "0.32.2"

0 commit comments

Comments
 (0)