python: keyring: support Python 2

This commit is contained in:
Orivej Desh 2019-11-23 14:51:19 +00:00
parent 576a82d6c2
commit 7e952c3321
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,33 @@
{ stdenv, buildPythonPackage, fetchPypi
, dbus-python, setuptools_scm, entrypoints, secretstorage
, pytest, pytest-flake8 }:
buildPythonPackage rec {
pname = "keyring";
version = "18.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "0f58jq58jhfzlhix7x2zz7c4ycdvcs1z3sgs4lkr4xxx680wrmk7";
};
nativeBuildInputs = [ setuptools_scm ];
checkInputs = [ pytest pytest-flake8 ];
propagatedBuildInputs = [ dbus-python entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage;
doCheck = !stdenv.isDarwin;
checkPhase = ''
py.test
'';
meta = with stdenv.lib; {
description = "Store and access your passwords safely";
homepage = "https://pypi.python.org/pypi/keyring";
license = licenses.psfl;
maintainers = with maintainers; [ lovek323 orivej ];
platforms = platforms.unix;
};
}

View File

@ -3686,7 +3686,10 @@ in {
jupyterhub-ldapauthenticator = callPackage ../development/python-modules/jupyterhub-ldapauthenticator { }; jupyterhub-ldapauthenticator = callPackage ../development/python-modules/jupyterhub-ldapauthenticator { };
keyring = callPackage ../development/python-modules/keyring { }; keyring = if isPy3k then
callPackage ../development/python-modules/keyring { }
else
callPackage ../development/python-modules/keyring/2.nix { };
keyutils = callPackage ../development/python-modules/keyutils { inherit (pkgs) keyutils; }; keyutils = callPackage ../development/python-modules/keyutils { inherit (pkgs) keyutils; };