From eed30dfa5c87e6aca95850b1e16da4113275084a Mon Sep 17 00:00:00 2001 From: Benjamin Hipple Date: Sat, 9 Nov 2019 11:39:00 -0500 Subject: 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 --- .../python-modules/measurement/default.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'pkgs/development/python-modules/measurement/default.nix') diff --git a/pkgs/development/python-modules/measurement/default.nix b/pkgs/development/python-modules/measurement/default.nix index 260d6262102..b3a0430a93b 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"; -- cgit 1.4.1