nixpkgs/pkgs/development/python-modules/gssapi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, buildPythonPackage
2020-09-13 00:24:14 +01:00
, pythonOlder
, fetchFromGitHub
, six
, decorator
, nose
2022-11-18 02:13:16 +01:00
, krb5
, GSS
, parameterized
, shouldbe
, cython
, python
, k5test
}:
buildPythonPackage rec {
pname = "gssapi";
2022-12-30 20:13:16 +01:00
version = "1.8.2";
2020-09-13 00:24:14 +01:00
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "pythongssapi";
repo = "python-${pname}";
2022-12-30 20:13:16 +01:00
rev = "refs/tags/v${version}";
sha256 = "sha256-qz4EWAO++yq72/AGwyNOtH/fTRSFbiCo/K98htROUxI=";
};
# It's used to locate headers
postPatch = ''
substituteInPlace setup.py \
2022-11-18 02:13:16 +01:00
--replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5}"'
'';
nativeBuildInputs = [
cython
2022-11-18 02:13:16 +01:00
krb5
];
propagatedBuildInputs = [
decorator
six
2020-09-13 00:24:14 +01:00
];
buildInputs = lib.optionals stdenv.isDarwin [
GSS
];
checkInputs = [
k5test
nose
parameterized
shouldbe
six
];
2020-09-13 00:24:14 +01:00
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
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
2022-01-18 14:29:46 +01:00
nosetests -e 'ext_test_\d.*'
'';
pythonImportsCheck = [ "gssapi" ];
meta = with lib; {
homepage = "https://pypi.python.org/pypi/gssapi";
description = "Python GSSAPI Wrapper";
license = licenses.mit;
};
}