summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2019-11-09 11:39:00 -0500
committerJon <jonringer@users.noreply.github.com>2020-01-11 14:10:18 -0800
commiteed30dfa5c87e6aca95850b1e16da4113275084a (patch)
tree11daf4d19651571098ebf2155f61abad2b7e90bf
parentMerge pull request #75438 from avnik/wine-update (diff)
downloadnixpkgs-eed30dfa5c87e6aca95850b1e16da4113275084a.tar.gz
pythonPackages.measurement: now python3 only
Upstream has dropped python2 support and updated their build dependencies as of the 3.0 version; see here for changelog: https://github.com/coddingtonbear/python-measurement/releases Co-Authored-By: Jon <jonringer@users.noreply.github.com>
-rw-r--r--pkgs/development/python-modules/measurement/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/measurement/default.nix b/pkgs/development/python-modules/measurement/default.nix
index 260d62621026..b3a0430a93b9 100644
--- a/pkgs/development/python-modules/measurement/default.nix
+++ b/pkgs/development/python-modules/measurement/default.nix
@@ -1,15 +1,26 @@
-{ lib, fetchPypi, buildPythonPackage, pbr, six, sympy }:
+{ lib, fetchFromGitHub, buildPythonPackage, isPy3k
+, sympy, pytest, pytestrunner, sphinx, setuptools_scm }:
buildPythonPackage rec {
pname = "measurement";
version = "3.2.0";
- src = fetchPypi {
- inherit pname version;
- sha256 = "352b20f7f0e553236af7c5ed48d091a51cf26061c1a063f46b31706ff7c0d57a";
+ disabled = !isPy3k;
+
+ src = fetchFromGitHub {
+ owner = "coddingtonbear";
+ repo = "python-measurement";
+ rev = version;
+ sha256 = "1mk9qg1q4cnnipr6xa72i17qvwwhz2hd8p4vlsa9gdzrcv4vr8h9";
};
- propagatedBuildInputs = [ pbr six sympy ];
+ postPatch = ''
+ sed -i 's|use_scm_version=True|version="${version}"|' setup.py
+ '';
+
+ checkInputs = [ pytest pytestrunner ];
+ nativeBuildInputs = [ sphinx setuptools_scm ];
+ propagatedBuildInputs = [ sympy ];
meta = with lib; {
description = "Use and manipulate unit-aware measurement objects in Python";