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:
https://github.com/IdentityPython/pyjwkest/pull/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.)
This commit is contained in:
Michael Stapelberg
2025-12-02 17:46:36 +01:00
parent bd98643a3d
commit dbefe89d9e
@@ -1,35 +1,48 @@
{
lib,
buildPythonPackage,
fetchPypi,
future,
fetchFromGitHub,
pycryptodomex,
pytest,
pytestCheckHook,
requests,
setuptools,
six,
}:
buildPythonPackage rec {
pname = "pyjwkest";
version = "1.4.2";
format = "setuptools";
version = "1.4.4";
pyproject = true;
meta = {
description = "Implementation of JWT, JWS, JWE and JWK";
homepage = "https://github.com/rohe/pyjwkest";
license = lib.licenses.asl20;
src = fetchFromGitHub {
owner = "IdentityPython";
repo = "pyjwkest";
tag = "v${version}";
hash = "sha256-G4/qLOOQHsNSMVndUdYBhrrk8uEufbI8Od3ziQiY0XI=";
};
src = fetchPypi {
inherit pname version;
sha256 = "5560fd5ba08655f29ff6ad1df1e15dc05abc9d976fcbcec8d2b5167f49b70222";
};
build-system = [ setuptools ];
buildInputs = [ pytest ];
propagatedBuildInputs = [
future
# Remove unused future import, see pending PR:
# https://github.com/IdentityPython/pyjwkest/pull/107
postPatch = ''
substituteInPlace setup.py \
--replace-fail '"future"' ""
'';
dependencies = [
pycryptodomex
requests
six
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "jwkest" ];
meta = {
description = "Implementation of JWT, JWS, JWE and JWK";
homepage = "https://github.com/IdentityPython/pyjwkest";
license = lib.licenses.asl20;
};
}