Commit 7e952c33 authored by Orivej Desh's avatar Orivej Desh
Browse files

python: keyring: support Python 2

parent 576a82d6
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
{ 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;
  };
}
+4 −1
Original line number Diff line number Diff line
@@ -3686,7 +3686,10 @@ in {

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