Merge pull request #48327 from Assassinkin/pythonPackagesCleanup

Python packages cleanup
This commit is contained in:
Florian Klink 2018-10-14 00:11:29 +02:00 committed by GitHub
commit a80026ec0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 89 additions and 81 deletions

View file

@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, pyyaml, mock }:
buildPythonPackage rec {
pname = "helper";
version = "2.4.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "0p56dvjpaz9wnr0ik2wmvgqjf9ji180bhjky7q272l5dan94lgd6";
};
buildInputs = [ mock ];
propagatedBuildInputs = [ pyyaml ];
# No tests in the pypi tarball
doCheck = false;
meta = with stdenv.lib; {
description = "Development library for quickly writing configurable applications and daemons";
homepage = https://helper.readthedocs.org/;
license = licenses.bsd3;
};
}

View file

@ -0,0 +1,30 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, requests, requests_oauthlib
, responses, mock, pytestcov, pytest, pytestcache, pytestpep8, coverage, six }:
buildPythonPackage rec {
version = "0.9.1";
pname = "mwclient";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "mwclient";
repo = "mwclient";
rev = "v${version}";
sha256 = "0l7l5j7znlyn2yqvdfxr4dq23wyp6d8z49pnkjqy2kan11nrjzym";
};
buildInputs = [ mock responses pytestcov pytest pytestcache pytestpep8 coverage ];
propagatedBuildInputs = [ six requests requests_oauthlib ];
checkPhase = ''
py.test
'';
meta = with stdenv.lib; {
description = "Python client library to the MediaWiki API";
maintainers = with maintainers; [ ];
license = licenses.mit;
homepage = https://github.com/mwclient/mwclient;
};
}

View file

@ -0,0 +1,29 @@
{ stdenv, buildPythonPackage, python, fetchPypi, isPy3k, glibcLocales }:
buildPythonPackage rec {
pname = "pystache-${version}";
version = "0.5.4";
src = fetchPypi {
inherit pname version;
sha256 = "f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a";
};
LC_ALL = "en_US.UTF-8";
buildInputs = [ glibcLocales ];
checkPhase = ''
${python.interpreter} -m unittest discover
'';
# SyntaxError Python 3
# https://github.com/defunkt/pystache/issues/181
doCheck = !isPy3k;
meta = with stdenv.lib; {
description = "A framework-agnostic, logic-free templating system inspired by ctemplate and et";
homepage = https://github.com/defunkt/pystache;
license = licenses.mit;
};
}

View file

@ -358,6 +358,8 @@ in {
habanero = callPackage ../development/python-modules/habanero { };
helper = callPackage ../development/python-modules/helper { };
histbook = callPackage ../development/python-modules/histbook { };
httpsig = callPackage ../development/python-modules/httpsig { };
@ -388,6 +390,8 @@ in {
mpi = pkgs.openmpi;
};
mwclient = callPackage ../development/python-modules/mwclient { };
mwoauth = callPackage ../development/python-modules/mwoauth { };
nest-asyncio = callPackage ../development/python-modules/nest-asyncio { };
@ -555,6 +559,8 @@ in {
slurm = pkgs.slurm;
};
pystache = callPackage ../development/python-modules/pystache { };
pytest-tornado = callPackage ../development/python-modules/pytest-tornado { };
python-binance = callPackage ../development/python-modules/python-binance { };
@ -2532,31 +2538,6 @@ in {
hbmqtt = callPackage ../development/python-modules/hbmqtt { };
helper = buildPythonPackage rec {
pname = "helper";
version = "2.4.1";
name = "${pname}-${version}";
src = pkgs.fetchurl {
url = "mirror://pypi/h/${pname}/${name}.tar.gz";
sha256 = "4e33dde42ad4df30fb7790689f93d77252cff26a565610d03ff2e434865a53a2";
};
buildInputs = with self; [ mock ];
propagatedBuildInputs = with self; [ pyyaml ];
# No tests
doCheck = false;
meta = {
description = "Development library for quickly writing configurable applications and daemons";
homepage = https://helper.readthedocs.org/;
license = licenses.bsd3;
};
};
hiro = callPackage ../development/python-modules/hiro {};
hglib = callPackage ../development/python-modules/hglib {};
@ -7502,34 +7483,6 @@ in {
mypy-protobuf = callPackage ../development/python-modules/mypy-protobuf { };
mwclient = buildPythonPackage rec {
version = "0.8.3";
pname = "mwclient";
name = "${pname}-${version}";
src = pkgs.fetchFromGitHub {
owner = "mwclient";
repo = "mwclient";
rev = "v${version}";
sha256 = "0kl1yp9z5f1wl6lkm0vix87zkrbl9wcmkrrj1x5c35xvf95laf53";
};
buildInputs = with self; [ mock responses pytestcov pytest pytestcache pytestpep8 coverage ];
propagatedBuildInputs = with self; [ six requests requests_oauthlib ];
checkPhase = ''
py.test
'';
meta = {
description = "Python client library to the MediaWiki API";
maintainers = with maintainers; [ ];
license = licenses.mit;
homepage = https://github.com/mwclient/mwclient;
};
};
neuronpy = buildPythonPackage rec {
name = "neuronpy-${version}";
version = "0.1.6";
@ -10382,34 +10335,6 @@ in {
};
};
pystache = buildPythonPackage rec {
name = "pystache-${version}";
version = "0.5.4";
src = pkgs.fetchurl {
url = "mirror://pypi/p/pystache/${name}.tar.gz";
sha256 = "f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a";
};
LC_ALL = "en_US.UTF-8";
buildInputs = [ pkgs.glibcLocales ];
checkPhase = ''
${python.interpreter} -m unittest discover
'';
# SyntaxError Python 3
# https://github.com/defunkt/pystache/issues/181
doCheck = !isPy3k;
meta = {
description = "A framework-agnostic, logic-free templating system inspired by ctemplate and et";
homepage = https://github.com/defunkt/pystache;
license = licenses.mit;
};
};
PyStemmer = callPackage ../development/python-modules/pystemmer {};
Pyro = callPackage ../development/python-modules/pyro { };