python3Packages.sip: 6.10.0 -> 6.12.0

This commit was automatically generated using update-python-libraries.
This commit is contained in:
Martin Weinelt
2025-08-09 19:04:13 +02:00
parent 6b64be8f64
commit 2136e3982f
2 changed files with 2 additions and 35 deletions
@@ -16,19 +16,14 @@
buildPythonPackage rec {
pname = "sip";
version = "6.10.0";
version = "6.12.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-+gUVaX1MmNvgTZ6JjYFt4UJ+W5rl0OFSFpEJ/SH10pw=";
hash = "sha256-CDztlPhTFUkyMRGaY5cLK6QrHTizjnMKcOAqmRkaicY=";
};
patches = [
# Make wheel file generation deterministic https://github.com/NixOS/nixpkgs/issues/383885
./sip-builder.patch
];
build-system = [
setuptools
setuptools-scm
@@ -1,28 +0,0 @@
--- a/sipbuild/builder.py 2025-04-21 12:19:34
+++ b/sipbuild/builder.py 2025-04-21 12:27:09
@@ -177,16 +177,23 @@
saved_cwd = os.getcwd()
os.chdir(wheel_build_dir)
- from zipfile import ZipFile, ZIP_DEFLATED
+ from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED
+ import time
+ epoch = int(os.environ.get('SOURCE_DATE_EPOCH', '946684800'))
+ zip_timestamp = time.gmtime(epoch)[:6]
+
with ZipFile(wheel_path, 'w', compression=ZIP_DEFLATED) as zf:
for dirpath, _, filenames in os.walk('.'):
for filename in filenames:
# This will result in a name with no leading '.'.
name = os.path.relpath(os.path.join(dirpath, filename))
- zf.write(name)
+ zi = ZipInfo(name, zip_timestamp)
+ with open(name, 'rb') as f:
+ zf.writestr(zi, f.read())
+
os.chdir(saved_cwd)
return wheel_file