Merge pull request #29072 from FRidh/python-fixes-3

Python: several fixes (3)
This commit is contained in:
Frederik Rietdijk
2017-09-07 19:26:20 +02:00
committed by GitHub
10 changed files with 179 additions and 90 deletions

View File

@@ -9,16 +9,16 @@ let
};
setuptools_source = fetchPypi {
pname = "setuptools";
version = "36.0.1";
version = "36.4.0";
format = "wheel";
sha256 = "f2900e560efc479938a219433c48f15a4ff4ecfe575a65de385eeb44f2425587";
sha256 = "4d54c0bfee283e78609169213f9c075827d5837086f58b588b417b093c23464b";
};
# TODO: Shouldn't be necessary anymore for pip > 9.0.1!
# https://github.com/NixOS/nixpkgs/issues/26392
# https://github.com/pypa/setuptools/issues/885
pkg_resources = fetchurl {
url = https://raw.githubusercontent.com/pypa/setuptools/v36.0.1/pkg_resources/__init__.py;
url = "https://raw.githubusercontent.com/pypa/setuptools/v36.4.0/pkg_resources/__init__.py";
sha256 = "1wdnq3mammk75mifkdmmjx7yhnpydvnvi804na8ym4mj934l2jkv";
};

View File

@@ -0,0 +1,27 @@
{ lib
, buildPythonPackage
, fetchPypi
, django
}:
buildPythonPackage rec {
pname = "django-multiselectfield";
name = "${pname}-${version}";
version = "0.1.8";
src = fetchPypi {
inherit pname version;
sha256 = "52483d23aecbf6b502f9e6806e97da9288d5d7f2a3f99f736390763de68c8fd7";
};
propagatedBuildInputs = [ django ];
# No tests
doCheck = false;
meta = {
description = "django-multiselectfield";
homepage = "https://github.com/goinnn/django-multiselectfield";
license = lib.licenses.lgpl3;
};
}

View File

@@ -0,0 +1,31 @@
{ lib
, buildPythonPackage
, fetchPypi
, pbr
, testtools
, mock
, python
}:
buildPythonPackage rec {
pname = "fixtures";
version = "3.0.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef";
};
propagatedBuildInputs = [ pbr testtools mock ];
checkPhase = ''
${python.interpreter} -m testtools.run fixtures.test_suite
'';
meta = {
description = "Reusable state for writing clean tests and more";
homepage = "https://pypi.python.org/pypi/fixtures";
license = lib.licenses.asl20;
};
}

View File

@@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, funcsigs
, six
}:
buildPythonPackage rec {
pname = "logfury";
name = "${pname}-${version}";
version = "0.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "1lywirv3d1lw691mc4mfpz7ak6r49klri43bbfgdnvsfppxminj2";
};
propagatedBuildInputs = [
funcsigs
six
];
# No tests
doCheck = false;
meta = {
description = "Logfury is for python library maintainers. It allows for responsible, low-boilerplate logging of method calls.";
homepage = "https://github.com/ppolewicz/logfury";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ jwiegley ];
};
}

View File

@@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, bleach
, docutils
, pygments
, six
}:
buildPythonPackage rec {
pname = "readme_renderer";
version = "17.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "9deab442963a63a71ab494bf581b1c844473995a2357f4b3228a1df1c8cba8da";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [
bleach docutils pygments six
];
checkPhase = ''
py.test
'';
meta = {
description = "readme_renderer is a library for rendering readme descriptions for Warehouse";
homepage = https://github.com/pypa/readme_renderer;
license = lib.licenses.asl20;
};
}

View File

@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchPypi
, docutils
, readme_renderer
, pygments
, mock
}:
buildPythonPackage rec {
pname = "restview";
name = "${pname}-${version}";
version = "2.7.0";
src = fetchPypi {
inherit pname version;
sha256 = "e7842100f3de179c68cfe7c2cf56c61509cd6068bc6dd58ab42c0ade5d5f97ec";
};
propagatedBuildInputs = [ docutils readme_renderer pygments ];
checkInputs = [ mock ];
postPatch = ''
# dict order breaking tests
sed -i 's@<a href="http://www.example.com" rel="nofollow">@...@' src/restview/tests.py
'';
meta = {
description = "ReStructuredText viewer";
homepage = http://mg.pov.lt/restview/;
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ koral ];
};
}

View File

@@ -8,13 +8,13 @@
# Should use buildPythonPackage here somehow
stdenv.mkDerivation rec {
pname = "setuptools";
version = "36.2.7";
version = "36.4.0";
name = "${python.libPrefix}-${pname}-${version}";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5";
sha256 = "2758b0270fe8ceec42f336ee5b411e60dc8579febc27bb3ba9b794dc7f0239ae";
};
buildInputs = [ python wrapPython unzip ];

View File

@@ -21,9 +21,12 @@ buildPythonPackage rec {
sha256 = "26431ab706fbae896db7870a0892743bfbb9f5c83231644692166a31d2d86048";
};
buildInputs = with self; [ nose ];
checkInputs = with self; [ nose ];
propagatedBuildInputs = with self; [numpy scipy pandas patsy cython matplotlib];
# Huge test suites with several test failures
doCheck = false;
meta = {
description = "Statistical computations and models for use with SciPy";
homepage = https://www.github.com/statsmodels/statsmodels;