From c8e496ecc5fc28f283933ce7b34887c6c99196ea Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Wed, 1 Jul 2020 22:52:13 -0400 Subject: [PATCH] pythonPackages.pkutils: init at 1.1.1 --- .../python-modules/pkutils/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pkutils/default.nix diff --git a/pkgs/development/python-modules/pkutils/default.nix b/pkgs/development/python-modules/pkutils/default.nix new file mode 100644 index 000000000000..d674e876b147 --- /dev/null +++ b/pkgs/development/python-modules/pkutils/default.nix @@ -0,0 +1,41 @@ +{ lib +, pythonOlder +, buildPythonPackage +, isPy3k +, fetchFromGitHub +, semver + # Check Inputs +, nose +}: + +buildPythonPackage rec { + pname = "pkutils"; + version = "1.1.1"; + disabled = !isPy3k; # some tests using semver fail due to unicode errors on Py2.7 + + src = fetchFromGitHub { + owner = "reubano"; + repo = "pkutils"; + rev = "v${version}"; + sha256 = "01yaq9sz6vyxk8yiss6hsmy70qj642cr2ifk0sx1mlh488flcm62"; + }; + + propagatedBuildInputs = [ semver ]; + + # Remove when https://github.com/reubano/pkutils/pull/4 merged + postPatch = '' + substituteInPlace requirements.txt --replace "semver>=2.2.1,<2.7.3" "semver" + ''; + + checkInputs = [ nose ]; + pythonImportsCheck = [ "pkutils" ]; + + checkPhase = "nosetests"; + + meta = with lib; { + description = "A Python packaging utility library"; + homepage = "https://github.com/reubano/pkutils/"; + license = licenses.mit; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ee0153e7911b..8171ae757849 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4783,6 +4783,8 @@ in { pint = callPackage ../development/python-modules/pint { }; + pkutils = callPackage ../development/python-modules/pkutils { }; + pygal = callPackage ../development/python-modules/pygal { }; pytaglib = callPackage ../development/python-modules/pytaglib { };