Unverified Commit e3ffebdf authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #250629 from fabaff/pysaml2-bump

python311Packages.pysaml2: 7.4.1 -> 7.4.2
parents a1a55a20 7cb58cc1
Loading
Loading
Loading
Loading
+18 −27
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
, cryptography
, defusedxml
, fetchFromGitHub
, fetchPypi
, importlib-resources
, poetry-core
, pyasn1
@@ -21,18 +20,9 @@
, xmlsec
}:

let
  pymongo3 = pymongo.overridePythonAttrs(old: rec {
    version = "3.12.3";
    src = fetchPypi {
      pname = "pymongo";
      inherit version;
      hash = "sha256-ConK3ABipeU2ZN3gQ/bAlxcrjBxfAJRJAJUoL/mZWl8=";
    };
  });
in buildPythonPackage rec {
buildPythonPackage rec {
  pname = "pysaml2";
  version = "7.4.1";
  version = "7.4.2";
  format = "pyproject";

  disabled = pythonOlder "3.9";
@@ -40,10 +30,22 @@ in buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "IdentityPython";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-QHAbm6u5oH3O7MEVFE+sW98raquv89KJ8gonk3Yyu/0=";
    rev = "refs/tags/v${version}";
    hash = "sha256-f8qd1Mfy32CYH9/PshfMMBviDg7OhOPlwz69bPjlYbg=";
  };

  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
  '';

  nativeBuildInputs = [
    poetry-core
  ];
@@ -63,23 +65,11 @@ in buildPythonPackage rec {

  nativeCheckInputs = [
    pyasn1
    pymongo3
    pymongo
    pytestCheckHook
    responses
  ];

  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
  '';

  disabledTests = [
    # Disabled tests try to access the network
    "test_load_extern_incommon"
@@ -95,6 +85,7 @@ in buildPythonPackage rec {
  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; [ ];
  };