From 467e802f223b7d13d12c9a7ae3495eef8a31b11a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 16 Sep 2024 00:00:48 +0200 Subject: [PATCH 1/2] python312Packages.pyhanko: mark as broken on darwin --- pkgs/development/python-modules/pyhanko/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/pyhanko/default.nix b/pkgs/development/python-modules/pyhanko/default.nix index 947f3911ce3d..0e98b38b46a9 100644 --- a/pkgs/development/python-modules/pyhanko/default.nix +++ b/pkgs/development/python-modules/pyhanko/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, aiohttp, asn1crypto, buildPythonPackage, @@ -122,5 +123,8 @@ buildPythonPackage rec { changelog = "https://github.com/MatthiasValvekens/pyHanko/blob/v${version}/docs/changelog.rst"; license = licenses.mit; maintainers = [ ]; + # Most tests fail with: + # OSError: One or more parameters passed to a function were not valid. + broken = stdenv.isDarwin; }; } From 1a26606a23ca152309d689f77b2c45c47678e37a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 16 Sep 2024 07:26:03 +0200 Subject: [PATCH 2/2] python312Packages.pyhanko: minor cleaning --- .../python-modules/pyhanko/default.nix | 55 ++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/pyhanko/default.nix b/pkgs/development/python-modules/pyhanko/default.nix index 0e98b38b46a9..f8cf0d88cbf2 100644 --- a/pkgs/development/python-modules/pyhanko/default.nix +++ b/pkgs/development/python-modules/pyhanko/default.nix @@ -1,33 +1,40 @@ { lib, stdenv, - aiohttp, - asn1crypto, buildPythonPackage, - certomancer, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + asn1crypto, click, cryptography, - defusedxml, - fetchFromGitHub, - fonttools, - freezegun, - oscrypto, - pillow, pyhanko-certvalidator, - pytest-aiohttp, - pytestCheckHook, - python-barcode, - python-pae, - python-pkcs11, - pythonOlder, pyyaml, qrcode, requests, - requests-mock, - setuptools, tzlocal, + + # optional-dependencies + oscrypto, + defusedxml, + fonttools, uharfbuzz, + pillow, + python-barcode, + python-pkcs11, + aiohttp, xsdata, + + # tests + certomancer, + freezegun, + pytest-aiohttp, + pytestCheckHook, + python-pae, + requests-mock, }: buildPythonPackage rec { @@ -35,8 +42,6 @@ buildPythonPackage rec { version = "0.25.1"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "MatthiasValvekens"; repo = "pyHanko"; @@ -57,7 +62,7 @@ buildPythonPackage rec { tzlocal ]; - passthru.optional-dependencies = { + optional-dependencies = { extra-pubkey-algs = [ oscrypto ]; xmp = [ defusedxml ]; opentype = [ @@ -77,11 +82,11 @@ buildPythonPackage rec { aiohttp certomancer freezegun - python-pae pytest-aiohttp - requests-mock pytestCheckHook - ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); + python-pae + requests-mock + ] ++ lib.flatten (lib.attrValues optional-dependencies); disabledTestPaths = [ # ModuleNotFoundError: No module named 'csc_dummy' @@ -116,12 +121,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "pyhanko" ]; - meta = with lib; { + meta = { description = "Sign and stamp PDF files"; mainProgram = "pyhanko"; homepage = "https://github.com/MatthiasValvekens/pyHanko"; changelog = "https://github.com/MatthiasValvekens/pyHanko/blob/v${version}/docs/changelog.rst"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; # Most tests fail with: # OSError: One or more parameters passed to a function were not valid.