2018-12-21 02:44:37 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
2018-10-16 21:37:02 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, betamax
|
2018-12-21 02:44:37 +00:00
|
|
|
, pytest
|
2018-10-16 21:37:02 +01:00
|
|
|
, betamax-matchers
|
2018-12-21 02:44:37 +00:00
|
|
|
, unittest2
|
|
|
|
, mock
|
2018-10-16 21:37:02 +01:00
|
|
|
, requests
|
2018-11-30 13:14:26 +00:00
|
|
|
, uritemplate
|
2018-12-21 02:44:37 +00:00
|
|
|
, dateutil
|
|
|
|
, jwcrypto
|
|
|
|
, pyopenssl
|
2018-10-16 21:37:02 +01:00
|
|
|
, ndg-httpsclient
|
|
|
|
, pyasn1
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "github3.py";
|
2021-02-24 22:43:13 +00:00
|
|
|
version = "2.0.0";
|
2018-10-16 21:37:02 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-24 22:43:13 +00:00
|
|
|
sha256 = "8dd4ac612fd60cb277eaf6e2ce02f68dda54aba06870ca6fa2b28369bf39aa14";
|
2018-10-16 21:37:02 +01:00
|
|
|
};
|
|
|
|
|
2018-12-21 02:44:37 +00:00
|
|
|
checkInputs = [ betamax pytest betamax-matchers ]
|
|
|
|
++ lib.optional (pythonOlder "3") unittest2
|
|
|
|
++ lib.optional (pythonOlder "3.3") mock;
|
2018-11-30 13:14:26 +00:00
|
|
|
propagatedBuildInputs = [ requests uritemplate dateutil jwcrypto pyopenssl ndg-httpsclient pyasn1 ];
|
2018-10-16 21:37:02 +01:00
|
|
|
|
|
|
|
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; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github3py.readthedocs.org/en/master/";
|
2018-10-16 21:37:02 +01:00
|
|
|
description = "A wrapper for the GitHub API written in python";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|