nixpkgs/pkgs/development/python-modules/github3_py/default.nix

48 lines
1.0 KiB
Nix
Raw Normal View History

2018-12-21 02:44:37 +00:00
{ lib
, pythonOlder
, buildPythonPackage
, fetchPypi
, betamax
2018-12-21 02:44:37 +00:00
, pytest
, betamax-matchers
2018-12-21 02:44:37 +00:00
, unittest2
, mock
, requests
, uritemplate
2018-12-21 02:44:37 +00:00
, dateutil
, jwcrypto
, pyopenssl
, ndg-httpsclient
, pyasn1
}:
buildPythonPackage rec {
pname = "github3.py";
2018-11-04 10:35:00 +00:00
version = "1.2.0";
src = fetchPypi {
inherit pname version;
2018-11-04 10:35:00 +00:00
sha256 = "35fea5bf3567a8e88d3660686d83f96ef164e698ce6fb30f9e2b0edded7357af";
};
2018-12-21 02:44:37 +00:00
checkInputs = [ betamax pytest betamax-matchers ]
++ lib.optional (pythonOlder "3") unittest2
++ lib.optional (pythonOlder "3.3") mock;
propagatedBuildInputs = [ requests uritemplate dateutil jwcrypto pyopenssl ndg-httpsclient pyasn1 ];
postPatch = ''
sed -i -e 's/unittest2 ==0.5.1/unittest2>=0.5.1/' setup.py
'';
# TODO: only disable the tests that require network
doCheck = false;
2018-12-21 02:44:37 +00:00
meta = with lib; {
homepage = http://github3py.readthedocs.org/en/master/;
description = "A wrapper for the GitHub API written in python";
license = licenses.bsd3;
maintainers = with maintainers; [ pSub ];
};
}