1{ lib
2, buildPythonPackage
3, isPy3k
4, fetchFromGitHub
5, semver
6 # Check Inputs
7, nose
8}:
9
10buildPythonPackage rec {
11 pname = "pkutils";
12 version = "1.1.1";
13 disabled = !isPy3k; # some tests using semver fail due to unicode errors on Py2.7
14
15 src = fetchFromGitHub {
16 owner = "reubano";
17 repo = "pkutils";
18 rev = "v${version}";
19 sha256 = "01yaq9sz6vyxk8yiss6hsmy70qj642cr2ifk0sx1mlh488flcm62";
20 };
21
22 propagatedBuildInputs = [ semver ];
23
24 # Remove when https://github.com/reubano/pkutils/pull/4 merged
25 postPatch = ''
26 substituteInPlace requirements.txt --replace "semver>=2.2.1,<2.7.3" "semver"
27 '';
28
29 checkInputs = [ nose ];
30 pythonImportsCheck = [ "pkutils" ];
31
32 checkPhase = "nosetests";
33
34 meta = with lib; {
35 description = "A Python packaging utility library";
36 homepage = "https://github.com/reubano/pkutils/";
37 license = licenses.mit;
38 maintainers = with maintainers; [ drewrisinger ];
39 };
40}