depot/third_party/nixpkgs/pkgs/development/python-modules/pysaml2/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

107 lines
1.8 KiB
Nix

{ lib
, buildPythonPackage
, cryptography
, defusedxml
, fetchFromGitHub
, fetchPypi
, paste
, poetry-core
, pyasn1
, pymongo
, pyopenssl
, pytestCheckHook
, python-dateutil
, pythonOlder
, pythonRelaxDepsHook
, pytz
, repoze-who
, requests
, responses
, setuptools
, substituteAll
, xmlschema
, xmlsec
, zope-interface
}:
buildPythonPackage rec {
pname = "pysaml2";
version = "7.5.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "IdentityPython";
repo = "pysaml2";
rev = "refs/tags/v${version}";
hash = "sha256-M/tdKGu6K38TeBZc8/dt376bHhPB0svHB3iis/se0DY=";
};
patches = [
(substituteAll {
src = ./hardcode-xmlsec1-path.patch;
inherit xmlsec;
})
];
postPatch = ''
# Fix failing tests on systems with 32bit time_t
sed -i 's/2999\(-.*T\)/2029\1/g' tests/*.xml
'';
pythonRelaxDeps = [
"xmlschema"
];
nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = [
cryptography
defusedxml
pyopenssl
python-dateutil
pytz
requests
setuptools
xmlschema
];
passthru.optional-dependencies = {
s2repoze = [
paste
repoze-who
zope-interface
];
};
nativeCheckInputs = [
pyasn1
pymongo
pytestCheckHook
responses
];
disabledTests = [
# Disabled tests try to access the network
"test_load_extern_incommon"
"test_load_remote_encoding"
"test_load_external"
"test_conf_syslog"
];
pythonImportsCheck = [
"saml2"
];
meta = with lib; {
description = "Python implementation of SAML Version 2 Standard";
homepage = "https://github.com/IdentityPython/pysaml2";
changelog = "https://github.com/IdentityPython/pysaml2/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}