2018-10-16 21:37:02 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, unittest2
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, betamax
|
|
|
|
, betamax-matchers
|
|
|
|
, dateutil
|
|
|
|
, requests
|
|
|
|
, pyopenssl
|
2018-11-30 13:14:26 +00:00
|
|
|
, uritemplate
|
2018-10-16 21:37:02 +01:00
|
|
|
, ndg-httpsclient
|
|
|
|
, pyasn1
|
2018-11-30 13:14:26 +00:00
|
|
|
, jwcrypto
|
2018-10-16 21:37:02 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "github3.py";
|
2018-11-04 10:35:00 +00:00
|
|
|
version = "1.2.0";
|
2018-10-16 21:37:02 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-11-04 10:35:00 +00:00
|
|
|
sha256 = "35fea5bf3567a8e88d3660686d83f96ef164e698ce6fb30f9e2b0edded7357af";
|
2018-10-16 21:37:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unittest2 pytest mock betamax betamax-matchers dateutil ];
|
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/mock ==1.0.1/mock>=1.0.1/' setup.py
|
|
|
|
sed -i -e 's/unittest2 ==0.5.1/unittest2>=0.5.1/' setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# TODO: only disable the tests that require network
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|