git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #29072 from FRidh/python-fixes-3

Python: several fixes (3)

commit56c56fb414861636ad7faf5dcf9e80142a46db2b authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateThu 7 Sep 2017, 19:26 (9 years ago) parentf9ea527b73e3bf
10 files changed+179−90
pkgs/development/interpreters/python/mk-python-derivation.nix+3−1 pkgs/development/python-modules/bootstrapped-pip/default.nix+3−3 pkgs/development/python-modules/django-multiselectfield/default.nix+27 pkgs/development/python-modules/fixtures/default.nix+31 pkgs/development/python-modules/logfury/default.nix+32 pkgs/development/python-modules/readme_renderer/default.nix+36 pkgs/development/python-modules/restview/default.nix+34 pkgs/development/python-modules/setuptools/default.nix+2−2 pkgs/development/python-modules/statsmodels/default.nix+4−1 pkgs/top-level/python-packages.nix+7−83
pkgs/development/interpreters/python/mk-python-derivation.nix+3−1
@@ -6,6 +6,8 @@
66, setuptools
77, unzip
88, ensureNewerSourcesHook
9+# Prevent impurities by blocking setuptools/easy-install from downloading sdists
10+, distutils-cfg
911}:
1012
1113{ name
@@ -60,7 +62,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "checkInputs"
6062
6163 inherit pythonPath;
6264
63− buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
65+ buildInputs = [ distutils-cfg wrapPython ] ++ buildInputs ++ pythonPath
6466 ++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
6567 ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
6668 ++ lib.optionals doCheck checkInputs;
pkgs/development/python-modules/bootstrapped-pip/default.nix+3−3
@@ -9,16 +9,16 @@ let
99 };
1010 setuptools_source = fetchPypi {
1111 pname = "setuptools";
12− version = "36.0.1";
12+ version = "36.4.0";
1313 format = "wheel";
14− sha256 = "f2900e560efc479938a219433c48f15a4ff4ecfe575a65de385eeb44f2425587";
14+ sha256 = "4d54c0bfee283e78609169213f9c075827d5837086f58b588b417b093c23464b";
1515 };
1616
1717 # TODO: Shouldn't be necessary anymore for pip > 9.0.1!
1818 # https://github.com/NixOS/nixpkgs/issues/26392
1919 # https://github.com/pypa/setuptools/issues/885
2020 pkg_resources = fetchurl {
21− url = https://raw.githubusercontent.com/pypa/setuptools/v36.0.1/pkg_resources/__init__.py;
21+ url = "https://raw.githubusercontent.com/pypa/setuptools/v36.4.0/pkg_resources/__init__.py";
2222 sha256 = "1wdnq3mammk75mifkdmmjx7yhnpydvnvi804na8ym4mj934l2jkv";
2323 };
2424
pkgs/development/python-modules/django-multiselectfield/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, django
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "django-multiselectfield";
9+ name = "${pname}-${version}";
10+ version = "0.1.8";
11+
12+ src = fetchPypi {
13+ inherit pname version;
14+ sha256 = "52483d23aecbf6b502f9e6806e97da9288d5d7f2a3f99f736390763de68c8fd7";
15+ };
16+
17+ propagatedBuildInputs = [ django ];
18+
19+ # No tests
20+ doCheck = false;
21+
22+ meta = {
23+ description = "django-multiselectfield";
24+ homepage = "https://github.com/goinnn/django-multiselectfield";
25+ license = lib.licenses.lgpl3;
26+ };
27+}
pkgs/development/python-modules/fixtures/default.nixnew file+31
@@ -0,0 +1,31 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, pbr
5+, testtools
6+, mock
7+, python
8+}:
9+
10+buildPythonPackage rec {
11+ pname = "fixtures";
12+ version = "3.0.0";
13+ name = "${pname}-${version}";
14+
15+ src = fetchPypi {
16+ inherit pname version;
17+ sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef";
18+ };
19+
20+ propagatedBuildInputs = [ pbr testtools mock ];
21+
22+ checkPhase = ''
23+ ${python.interpreter} -m testtools.run fixtures.test_suite
24+ '';
25+
26+ meta = {
27+ description = "Reusable state for writing clean tests and more";
28+ homepage = "https://pypi.python.org/pypi/fixtures";
29+ license = lib.licenses.asl20;
30+ };
31+}
pkgs/development/python-modules/logfury/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, funcsigs
5+, six
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "logfury";
10+ name = "${pname}-${version}";
11+ version = "0.1.2";
12+
13+ src = fetchPypi {
14+ inherit pname version;
15+ sha256 = "1lywirv3d1lw691mc4mfpz7ak6r49klri43bbfgdnvsfppxminj2";
16+ };
17+
18+ propagatedBuildInputs = [
19+ funcsigs
20+ six
21+ ];
22+
23+ # No tests
24+ doCheck = false;
25+
26+ meta = {
27+ description = "Logfury is for python library maintainers. It allows for responsible, low-boilerplate logging of method calls.";
28+ homepage = "https://github.com/ppolewicz/logfury";
29+ license = lib.licenses.bsd3;
30+ maintainers = with lib.maintainers; [ jwiegley ];
31+ };
32+}
pkgs/development/python-modules/readme_renderer/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, pytest
5+, bleach
6+, docutils
7+, pygments
8+, six
9+}:
10+
11+buildPythonPackage rec {
12+ pname = "readme_renderer";
13+ version = "17.2";
14+ name = "${pname}-${version}";
15+
16+ src = fetchPypi {
17+ inherit pname version;
18+ sha256 = "9deab442963a63a71ab494bf581b1c844473995a2357f4b3228a1df1c8cba8da";
19+ };
20+
21+ checkInputs = [ pytest ];
22+
23+ propagatedBuildInputs = [
24+ bleach docutils pygments six
25+ ];
26+
27+ checkPhase = ''
28+ py.test
29+ '';
30+
31+ meta = {
32+ description = "readme_renderer is a library for rendering readme descriptions for Warehouse";
33+ homepage = https://github.com/pypa/readme_renderer;
34+ license = lib.licenses.asl20;
35+ };
36+}
pkgs/development/python-modules/restview/default.nixnew file+34
@@ -0,0 +1,34 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, docutils
5+, readme_renderer
6+, pygments
7+, mock
8+}:
9+
10+buildPythonPackage rec {
11+ pname = "restview";
12+ name = "${pname}-${version}";
13+ version = "2.7.0";
14+
15+ src = fetchPypi {
16+ inherit pname version;
17+ sha256 = "e7842100f3de179c68cfe7c2cf56c61509cd6068bc6dd58ab42c0ade5d5f97ec";
18+ };
19+
20+ propagatedBuildInputs = [ docutils readme_renderer pygments ];
21+ checkInputs = [ mock ];
22+
23+ postPatch = ''
24+ # dict order breaking tests
25+ sed -i 's@<a href="http://www.example.com" rel="nofollow">@...@' src/restview/tests.py
26+ '';
27+
28+ meta = {
29+ description = "ReStructuredText viewer";
30+ homepage = http://mg.pov.lt/restview/;
31+ license = lib.licenses.gpl2;
32+ maintainers = with lib.maintainers; [ koral ];
33+ };
34+}
pkgs/development/python-modules/setuptools/default.nix+2−2
@@ -8,13 +8,13 @@
88# Should use buildPythonPackage here somehow
99stdenv.mkDerivation rec {
1010 pname = "setuptools";
11− version = "36.2.7";
11+ version = "36.4.0";
1212 name = "${python.libPrefix}-${pname}-${version}";
1313
1414 src = fetchPypi {
1515 inherit pname version;
1616 extension = "zip";
17− sha256 = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5";
17+ sha256 = "2758b0270fe8ceec42f336ee5b411e60dc8579febc27bb3ba9b794dc7f0239ae";
1818 };
1919
2020 buildInputs = [ python wrapPython unzip ];
pkgs/development/python-modules/statsmodels/default.nix+4−1
@@ -21,9 +21,12 @@ buildPythonPackage rec {
2121 sha256 = "26431ab706fbae896db7870a0892743bfbb9f5c83231644692166a31d2d86048";
2222 };
2323
24− buildInputs = with self; [ nose ];
24+ checkInputs = with self; [ nose ];
2525 propagatedBuildInputs = with self; [numpy scipy pandas patsy cython matplotlib];
2626
27+ # Huge test suites with several test failures
28+ doCheck = false;
29+
2730 meta = {
2831 description = "Statistical computations and models for use with SciPy";
2932 homepage = https://www.github.com/statsmodels/statsmodels;
pkgs/top-level/python-packages.nix+7−83
@@ -34,6 +34,7 @@ let
3434 bootstrapped-pip = callPackage ../development/python-modules/bootstrapped-pip { };
3535
3636 mkPythonDerivation = makeOverridable( callPackage ../development/interpreters/python/mk-python-derivation.nix {
37+ distutils-cfg = callPackage ../development/python-modules/distutils-cfg { };
3738 });
3839
3940 # Derivations built with `buildPythonPackage` can already be overriden with `override`, `overrideAttrs`, and `overrideDerivation`.
@@ -7018,27 +7019,7 @@ in {
70187019 };
70197020 };
70207021
7021− logfury = buildPythonPackage rec {
7022− name = "logfury-${version}";
7023− version = "0.1.2";
7024−
7025− src = pkgs.fetchurl {
7026− url = "mirror://pypi/l/logfury/${name}.tar.gz";
7027− sha256 = "1lywirv3d1lw691mc4mfpz7ak6r49klri43bbfgdnvsfppxminj2";
7028− };
7029−
7030− buildInputs =
7031− [ self.funcsigs
7032− self.six
7033− ];
7034−
7035− meta = with pkgs.stdenv.lib; {
7036− description = "Logfury is for python library maintainers. It allows for responsible, low-boilerplate logging of method calls.";
7037− homepage = "https://github.com/ppolewicz/logfury";
7038− license = licenses.bsd3;
7039− maintainers = with maintainers; [ jwiegley ];
7040− };
7041− };
7022+ logfury = callPackage ../development/python-modules/logfury { };
70427023
70437024 ndg-httpsclient = buildPythonPackage rec {
70447025 version = "0.4.2";
@@ -15768,22 +15749,7 @@ in {
1576815749
1576915750 pbr = callPackage ../development/python-modules/pbr { };
1577015751
15771− fixtures = buildPythonPackage rec {
15772− name = "fixtures-1.4.0";
15773−
15774− src = pkgs.fetchurl {
15775− url = "mirror://pypi/f/fixtures/${name}.tar.gz";
15776− sha256 = "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y";
15777− };
15778−
15779− buildInputs = with self; [ pbr testtools mock ];
15780−
15781− meta = {
15782− description = "Reusable state for writing clean tests and more";
15783− homepage = "https://pypi.python.org/pypi/fixtures";
15784− license = licenses.asl20;
15785− };
15786− };
15752+ fixtures = callPackage ../development/python-modules/fixtures { };
1578715753
1578815754 pelican = callPackage ../development/python-modules/pelican {
1578915755 inherit (pkgs) glibcLocales pandoc git;
@@ -19147,31 +19113,7 @@ in {
1914719113 };
1914819114
1914919115
19150− restview = buildPythonPackage rec {
19151− name = "restview-${version}";
19152− version = "2.5.2";
19153−
19154− src = pkgs.fetchurl {
19155− url = "mirror://pypi/r/restview/${name}.tar.gz";
19156− sha256 = "0gmdmnlhiy6lagi17maiz312374hk6g6x90fhjwnbrwxif4r9bd5";
19157− };
19158−
19159− propagatedBuildInputs = with self; [ docutils readme pygments ];
19160− buildInputs = with self; [ mock ];
19161−
19162− patchPhase = ''
19163− # dict order breaking tests
19164− sed -i 's@<a href="http://www.example.com" rel="nofollow">@...@' src/restview/tests.py
19165− '';
19166−
19167− meta = {
19168− description = "ReStructuredText viewer";
19169− homepage = http://mg.pov.lt/restview/;
19170− license = licenses.gpl2;
19171− platforms = platforms.all;
19172− maintainers = with maintainers; [ koral ];
19173− };
19174− };
19116+ restview = callPackage ../development/python-modules/restview { };
1917519117
1917619118 readme = buildPythonPackage rec {
1917719119 name = "readme-${version}";
@@ -19200,6 +19142,8 @@ in {
1920019142 };
1920119143 };
1920219144
19145+ readme_renderer = callPackage ../development/python-modules/readme_renderer { };
19146+
1920319147 rjsmin = callPackage ../development/python-modules/rjsmin { };
1920419148
1920519149 pysolr = buildPythonPackage rec {
@@ -19286,27 +19230,7 @@ in {
1928619230 };
1928719231 };
1928819232
19289− django-multiselectfield = buildPythonPackage rec {
19290− name = "django-multiselectfield-${version}";
19291− version = "0.1.3";
19292−
19293− src = pkgs.fetchurl {
19294− url = "mirror://pypi/d/django-multiselectfield/django-multiselectfield-${version}.tar.gz";
19295− sha256 = "0v7wf82f8688srdsym9ajv1j54bxfxwvydypc03f8xyl4c1raziv";
19296− };
19297−
19298− propagatedBuildInputs = with self; [
19299−
19300− ];
19301− buildInputs = with self; [
19302−
19303− ];
19304−
19305− meta = with stdenv.lib; {
19306− description = "django-multiselectfield";
19307− homepage = "https://github.com/goinnn/django-multiselectfield";
19308− };
19309− };
19233+ django-multiselectfield = callPackage ../development/python-modules/django-multiselectfield { };
1931019234
1931119235 reviewboard = buildPythonPackage rec {
1931219236 name = "ReviewBoard-2.5.1.1";