diff options
Diffstat (limited to 'pkgs/development/python-modules/gssapi/default.nix')
-rw-r--r-- | pkgs/development/python-modules/gssapi/default.nix | 83 |
1 files changed, 41 insertions, 42 deletions
diff --git a/pkgs/development/python-modules/gssapi/default.nix b/pkgs/development/python-modules/gssapi/default.nix index 8ca5f8ebc6f7..525cfa3208a6 100644 --- a/pkgs/development/python-modules/gssapi/default.nix +++ b/pkgs/development/python-modules/gssapi/default.nix @@ -1,24 +1,32 @@ -{ stdenv -, lib -, buildPythonPackage -, pythonOlder -, fetchFromGitHub -, six -, decorator -, nose -, krb5 -, GSS -, parameterized -, shouldbe -, cython -, python -, k5test +{ + stdenv, + lib, + buildPythonPackage, + pythonOlder, + fetchFromGitHub, + + # build-system + cython, + setuptools, + + # dependencies + decorator, + + # native dependencies + GSS, + krb5-c, # C krb5 library, not PyPI krb5 + + # tests + parameterized, + k5test, + pytestCheckHook, }: buildPythonPackage rec { pname = "gssapi"; version = "1.8.3"; - format = "setuptools"; + pyproject = true; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { @@ -28,52 +36,43 @@ buildPythonPackage rec { hash = "sha256-H1JfdvxJvX5dmC9aTqIOkjAqFEL44KoUXEhoYj2uRY8="; }; - # It's used to locate headers postPatch = '' substituteInPlace setup.py \ - --replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5}"' + --replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5-c}"' ''; env = lib.optionalAttrs (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) { GSSAPI_SUPPORT_DETECT = "false"; }; - nativeBuildInputs = [ + build-system = [ cython - krb5 + krb5-c + setuptools ]; - propagatedBuildInputs = [ - decorator - six - ]; + dependencies = [ decorator ]; - buildInputs = lib.optionals stdenv.isDarwin [ - GSS - ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ GSS ]; + + # k5test is marked as broken on darwin + doCheck = !stdenv.hostPlatform.isDarwin; nativeCheckInputs = [ k5test - nose parameterized - shouldbe - six + pytestCheckHook ]; - doCheck = pythonOlder "3.8" # `shouldbe` not available - && !stdenv.isDarwin; # many failures on darwin - - # skip tests which fail possibly due to be an upstream issue (see - # https://github.com/pythongssapi/python-gssapi/issues/220) - checkPhase = '' - # some tests don't respond to being disabled through nosetests -x - echo $'\ndel CredsTestCase.test_add_with_impersonate' >> gssapi/tests/test_high_level.py - echo $'\ndel TestBaseUtilities.test_acquire_creds_impersonate_name' >> gssapi/tests/test_raw.py - echo $'\ndel TestBaseUtilities.test_add_cred_impersonate_name' >> gssapi/tests/test_raw.py + preCheck = '' + mv gssapi/tests $TMPDIR/ + pushd $TMPDIR + ''; - export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" - nosetests -e 'ext_test_\d.*' + postCheck = '' + popd ''; + pythonImportsCheck = [ "gssapi" ]; meta = with lib; { |