pythonPackages.github3_py: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-16 16:37:02 -04:00 committed by Frederik Rietdijk
parent c26dd4138b
commit dc56c8faf9
2 changed files with 46 additions and 29 deletions

View File

@ -0,0 +1,45 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, unittest2
, pytest
, mock
, betamax
, betamax-matchers
, dateutil
, requests
, pyopenssl
, uritemplate_py
, ndg-httpsclient
, requests_toolbelt
, pyasn1
}:
buildPythonPackage rec {
pname = "github3.py";
version = "1.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "1cxaqdqmz9w2afc0cw2jyv783fp0grydbik0frzj79azzkhyg4gf";
};
buildInputs = [ unittest2 pytest mock betamax betamax-matchers dateutil ];
propagatedBuildInputs = [ requests pyopenssl uritemplate_py ndg-httpsclient requests_toolbelt pyasn1 ];
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 ];
};
}

View File

@ -2386,35 +2386,7 @@ in {
glances = callPackage ../development/python-modules/glances { };
github3_py = buildPythonPackage rec {
name = "github3.py-${version}";
version = "1.1.0";
src = pkgs.fetchurl {
url = "mirror://pypi/g/github3.py/${name}.tar.gz";
sha256 = "1cxaqdqmz9w2afc0cw2jyv783fp0grydbik0frzj79azzkhyg4gf";
};
buildInputs = with self; [ unittest2 pytest mock betamax betamax-matchers dateutil ];
propagatedBuildInputs = with self; [ requests pyopenssl uritemplate_py
ndg-httpsclient requests_toolbelt pyasn1 ];
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 ];
};
};
github3_py = callPackage ../development/python-modules/github3_py { };
github-webhook = buildPythonPackage rec {
name = "github-webhook-${version}";