Skip to content

Commit 14b8082

Browse files
stapelberggithub-actions[bot]
authored andcommitted
pyjwkest: remove 'future' dependency to fix build
This dependency is unused in pyjwkest, but disabled in nixpkgs. There is an upstream pull request pending to remove the dependency: IdentityPython/pyjwkest#107 Before this change, these 2 Python packages failed to build: nix build .#python313Packages.pyjwkest nix build .#python313Packages.oic With the following message: error: … while evaluating the attribute 'drvPath' at /nix/store/65sypvf1f26fyi1vq6h25wg9z5gipgy8-source/lib/customisation.nix:429:7: 428| // { 429| drvPath = | ^ 430| assert condition; … while evaluating the attribute 'drvPath' at /nix/store/65sypvf1f26fyi1vq6h25wg9z5gipgy8-source/lib/customisation.nix:429:7: 428| // { 429| drvPath = | ^ 430| assert condition; … while calling the 'derivationStrict' builtin at <nix/derivation-internal.nix>:37:12: 36| 37| strict = derivationStrict drvAttrs; | ^ 38| (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: future-1.0.0 not supported for interpreter python3.13 (I am using the oic package via the pretix-oidc plugin.) (cherry picked from commit dbefe89)
1 parent 640e50e commit 14b8082

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed
Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
{
22
lib,
33
buildPythonPackage,
4-
fetchPypi,
5-
future,
4+
fetchFromGitHub,
65
pycryptodomex,
7-
pytest,
6+
pytestCheckHook,
87
requests,
8+
setuptools,
99
six,
1010
}:
1111

1212
buildPythonPackage rec {
1313
pname = "pyjwkest";
14-
version = "1.4.2";
15-
format = "setuptools";
14+
version = "1.4.4";
15+
pyproject = true;
1616

17-
meta = {
18-
description = "Implementation of JWT, JWS, JWE and JWK";
19-
homepage = "https://github.com/rohe/pyjwkest";
20-
license = lib.licenses.asl20;
17+
src = fetchFromGitHub {
18+
owner = "IdentityPython";
19+
repo = "pyjwkest";
20+
tag = "v${version}";
21+
hash = "sha256-G4/qLOOQHsNSMVndUdYBhrrk8uEufbI8Od3ziQiY0XI=";
2122
};
2223

23-
src = fetchPypi {
24-
inherit pname version;
25-
sha256 = "5560fd5ba08655f29ff6ad1df1e15dc05abc9d976fcbcec8d2b5167f49b70222";
26-
};
24+
build-system = [ setuptools ];
25+
26+
# Remove unused future import, see pending PR:
27+
# https://github.com/IdentityPython/pyjwkest/pull/107
28+
postPatch = ''
29+
substituteInPlace setup.py \
30+
--replace-fail '"future"' ""
31+
'';
2732

28-
buildInputs = [ pytest ];
29-
propagatedBuildInputs = [
30-
future
33+
dependencies = [
3134
pycryptodomex
3235
requests
3336
six
3437
];
38+
39+
nativeCheckInputs = [ pytestCheckHook ];
40+
41+
pythonImportsCheck = [ "jwkest" ];
42+
43+
meta = {
44+
description = "Implementation of JWT, JWS, JWE and JWK";
45+
homepage = "https://github.com/IdentityPython/pyjwkest";
46+
license = lib.licenses.asl20;
47+
};
3548
}

0 commit comments

Comments
 (0)