Merge pull request #37439 from dotlambda/python-fixes
Python fixes, cc #36453
This commit is contained in:
49
pkgs/development/python-modules/WSME/default.nix
Normal file
49
pkgs/development/python-modules/WSME/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, isPy3k
|
||||
, pbr, six, simplegeneric, netaddr, pytz, webob
|
||||
, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx
|
||||
, flask, flask-restful, suds-jurko, glibcLocales }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "WSME";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "e790ac755a7e36eaa796d3966d3878677896dbc7d1c2685cb85c06b744c21976";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# remove turbogears tests as we don't have it packaged
|
||||
rm tests/test_tg*
|
||||
# WSME seems incompatible with recent SQLAlchemy version
|
||||
rm wsmeext/tests/test_sqlalchemy*
|
||||
# https://bugs.launchpad.net/wsme/+bug/1510823
|
||||
${if isPy3k then "rm tests/test_cornice.py" else ""}
|
||||
'';
|
||||
|
||||
checkPhae = ''
|
||||
nosetests --exclude test_buildhtml \
|
||||
--exlcude test_custom_clientside_error \
|
||||
--exclude test_custom_non_http_clientside_error
|
||||
'';
|
||||
|
||||
# UnicodeEncodeError, ImportError, ...
|
||||
doCheck = !isPy3k;
|
||||
|
||||
nativeBuildInputs = [ pbr ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
six simplegeneric netaddr pytz webob
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
cornice nose webtest pecan transaction cherrypy sphinx
|
||||
flask flask-restful suds-jurko glibcLocales
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simplify the writing of REST APIs, and extend them with additional protocols";
|
||||
homepage = http://git.openstack.org/cgit/openstack/wsme;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
@@ -1,17 +1,20 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi
|
||||
, pytest, vega, pandas, ipython, traitlets }:
|
||||
, pytest, glibcLocales, vega, pandas, ipython, traitlets }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "altair";
|
||||
version = "1.2.1";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "c1303f77f1ba4d632f2958c83c0f457b2b969860b1ac9adfb872aefa1780baa7";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest ];
|
||||
postPatch = ''
|
||||
sed -i "s/vega==/vega>=/g" setup.py
|
||||
'';
|
||||
|
||||
checkInputs = [ pytest glibcLocales ];
|
||||
|
||||
checkPhase = ''
|
||||
export LANG=en_US.UTF-8
|
||||
@@ -19,8 +22,6 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ vega pandas ipython traitlets ];
|
||||
# Disabling checks, MockRequest object has no method send()
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A declarative statistical visualization library for Python.";
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, numpy
|
||||
, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
||||
pname = "astropy";
|
||||
version = "3.0";
|
||||
|
||||
name = "${pname}-${version}";
|
||||
disabled = !isPy3k; # according to setup.py
|
||||
|
||||
doCheck = false; #Some tests are failing. More importantly setup.py hangs on completion. Needs fixing with a proper shellhook.
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "9e0ad19b9d6d227bdf0932bbe64a8c5dd4a47d4ec078586cf24bf9f0c61d9ecf";
|
||||
@@ -18,7 +20,6 @@ buildPythonPackage rec {
|
||||
|
||||
propagatedBuildInputs = [ pytest numpy ]; # yes it really has pytest in install_requires
|
||||
|
||||
|
||||
meta = {
|
||||
description = "Astronomy/Astrophysics library for Python";
|
||||
homepage = http://www.astropy.org;
|
||||
|
||||
41
pkgs/development/python-modules/deform/default.nix
Normal file
41
pkgs/development/python-modules/deform/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ lib, buildPythonPackage, fetchPypi
|
||||
, chameleon, colander, iso8601, peppercorn, translationstring, zope_deprecation
|
||||
, nose, coverage, beautifulsoup4, flaky }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "deform";
|
||||
version = "2.0.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "874d3346a02c500432efdcc73b1a7174aa0ea69cd52a99bb9a812967f54f6f79";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "iso8601<=0.1.11" iso8601
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
chameleon
|
||||
colander
|
||||
iso8601
|
||||
peppercorn
|
||||
translationstring
|
||||
zope_deprecation
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
nose
|
||||
coverage
|
||||
beautifulsoup4
|
||||
flaky
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Form library with advanced features like nested forms";
|
||||
homepage = https://docs.pylonsproject.org/projects/deform/en/latest/;
|
||||
license = licenses.free; # http://www.repoze.org/LICENSE.txt
|
||||
maintainers = with maintainers; [ garbas domenkozar ];
|
||||
};
|
||||
}
|
||||
36
pkgs/development/python-modules/django-pipeline/default.nix
Normal file
36
pkgs/development/python-modules/django-pipeline/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
|
||||
, django, futures, mock, jinja2, jsmin, slimit }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-pipeline";
|
||||
version = "1.6.14";
|
||||
|
||||
# no tests on PyPI
|
||||
src = fetchFromGitHub {
|
||||
owner = "jazzband";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1xf732bd17mgha75jfhlnms46ib2pffhpfa0ca7bmng9jhbvsl9j";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tests/tests/test_compiler.py \
|
||||
--replace "/usr/bin/env" ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ django ] ++ lib.optional (!isPy3k) futures;
|
||||
|
||||
checkInputs = [ jinja2 jsmin slimit ] ++ lib.optional (!isPy3k) mock;
|
||||
|
||||
checkPhase = ''
|
||||
export PYTHONPATH=.:$PYTHONPATH
|
||||
export DJANGO_SETTINGS_MODULE=tests.settings
|
||||
${django}/bin/django-admin.py test tests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pipeline is an asset packaging library for Django";
|
||||
homepage = https://github.com/cyberdelia/django-pipeline;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
27
pkgs/development/python-modules/klein/default.nix
Normal file
27
pkgs/development/python-modules/klein/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ lib, buildPythonPackage, fetchPypi
|
||||
, six, twisted, werkzeug, incremental
|
||||
, mock }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "klein";
|
||||
version = "17.10.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "30aaf0d78a987d5dbfe0968a07367ad0c73e02823cc8eef4c54f80ab848370d0";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six twisted werkzeug incremental ];
|
||||
|
||||
checkInputs = [ mock ];
|
||||
|
||||
checkPhase = ''
|
||||
trial klein
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Klein Web Micro-Framework";
|
||||
homepage = "https://github.com/twisted/klein";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
36
pkgs/development/python-modules/slimit/default.nix
Normal file
36
pkgs/development/python-modules/slimit/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, isPy3k, fetchpatch, python, ply }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "slimit";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
sha256 = "f433dcef899f166b207b67d91d3f7344659cb33b8259818f084167244e17720b";
|
||||
};
|
||||
|
||||
# Some patches from https://github.com/rspivak/slimit/pull/65
|
||||
patches = lib.optionals isPy3k [
|
||||
(fetchpatch {
|
||||
url = https://github.com/lelit/slimit/commit/a61e12d88cc123c4b7af2abef21d06fd182e561a.patch;
|
||||
sha256 = "0lbhvkgn4l8g9fwvb81rfwjx7hsaq2pid8a5gczdk1ba65wfvdq5";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = https://github.com/lelit/slimit/commit/e8331659fb89e8a4613c5e4e338c877fead9c551.patch;
|
||||
sha256 = "1hv4ysn09c9bfd5bxhhrp51hsi81hdidmx0y7zcrjjiich9ayrni";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ ply ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest discover -s src/slimit
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "JavaScript minifier";
|
||||
homepage = http://slimit.readthedocs.org/;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
30
pkgs/development/python-modules/stem/default.nix
Normal file
30
pkgs/development/python-modules/stem/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, python, mock }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "stem";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
rm test/unit/installation.py
|
||||
sed -i "/test.unit.installation/d" test/settings.cfg
|
||||
'';
|
||||
|
||||
checkInputs = [ mock ];
|
||||
|
||||
checkPhase = ''
|
||||
touch .gitignore
|
||||
${python.interpreter} run_tests.py -u
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Controller library that allows applications to interact with Tor";
|
||||
homepage = https://stem.torproject.org/;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ phreedom ];
|
||||
};
|
||||
}
|
||||
@@ -8,20 +8,23 @@
|
||||
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "zope_copy";
|
||||
version = "4.0.2";
|
||||
pname = "zope.copy";
|
||||
version = "4.1.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
sha256 = "eb2a95866df1377741876a3ee62d8600e80089e6246e1a235e86791b29534457";
|
||||
sha256 = "702dbb52e2427a1cc2e2b4b3f5a40c64dcbf9ebed85888ae8fa67172263a6994";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ zope_interface ];
|
||||
|
||||
checkInputs = [ zope_location zope_schema ];
|
||||
|
||||
checkPhase = ''
|
||||
python -m unittest discover -s src/zope/copy
|
||||
'';
|
||||
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ domenkozar ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user