Merge pull request #36199 from dotlambda/python-unstable

python fixes
This commit is contained in:
Robert Schütz 2018-03-02 20:57:13 +01:00 committed by GitHub
commit 75c20548bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 156 additions and 88 deletions

View File

@ -1,13 +1,17 @@
{ lib, buildPythonPackage, fetchPypi }: { lib, buildPythonPackage, fetchPypi, isPy3k }:
buildPythonPackage rec { buildPythonPackage rec {
name = "${pname}-${version}";
pname = "affinity"; pname = "affinity";
version = "0.1.0"; version = "0.1.0";
# syntax error
disabled = isPy3k;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "1i6j7kszvnzh5vh9k48cqwx2kzf73a6abgv9s6bf0j2zmfjl2wb6"; sha256 = "1i6j7kszvnzh5vh9k48cqwx2kzf73a6abgv9s6bf0j2zmfjl2wb6";
}; };
meta = { meta = {
description = "control processor affinity on windows and linux"; description = "control processor affinity on windows and linux";
homepage = http://cheeseshop.python.org/pypi/affinity; homepage = http://cheeseshop.python.org/pypi/affinity;

View File

@ -1,28 +1,38 @@
{ stdenv, fetchPypi, buildPythonPackage, { lib, fetchPypi, buildPythonPackage, isPy3k
dateutil, dbf, xlrd, sqlalchemy, openpyxl, , agate, agate-excel, agate-dbf, agate-sql, six
agate-excel, agate-dbf, agate-sql, isPy3k }: , argparse, ordereddict, simplejson
, glibcLocales, nose, mock, unittest2
}:
buildPythonPackage rec { buildPythonPackage rec {
name = "${pname}-${version}"; pname = "csvkit";
pname = "csvkit"; version = "1.0.2";
version = "1.0.2";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "05vfsba9nwh4islszgs18rq8sjkpzqni0cdwvvkw7pi0r63pz2as"; sha256 = "05vfsba9nwh4islszgs18rq8sjkpzqni0cdwvvkw7pi0r63pz2as";
}; };
propagatedBuildInputs = [ dateutil dbf xlrd sqlalchemy openpyxl propagatedBuildInputs = [
agate-excel agate-dbf agate-sql ]; agate agate-excel agate-dbf agate-sql six
] ++ lib.optionals (!isPy3k) [
argparse ordereddict simplejson
];
doCheck = !isPy3k; checkInputs = [
# (only) python 3 we had 9 failures and 57 errors out of a much larger glibcLocales nose
# number of tests. ] ++ lib.optionals (!isPy3k) [
mock unittest2
];
meta = with stdenv.lib; { checkPhase = ''
description = "A library of utilities for working with CSV, the king of tabular file formats"; LC_ALL="en_US.UTF-8" nosetests -e test_csvsql
maintainers = with maintainers; [ vrthra ]; '';
license = with licenses; [ mit ];
homepage = https://github.com/wireservice/csvkit; meta = with lib; {
}; description = "A library of utilities for working with CSV, the king of tabular file formats";
maintainers = with maintainers; [ vrthra ];
license = with licenses; [ mit ];
homepage = https://github.com/wireservice/csvkit;
};
} }

View File

@ -0,0 +1,20 @@
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "dj-database-url";
version = "0.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "4aeaeb1f573c74835b0686a2b46b85990571159ffc21aa57ecd4d1e1cb334163";
};
# Tests access a DB via network
doCheck = false;
meta = with lib; {
description = "Use Database URLs in your Django Application";
homepage = https://github.com/kennethreitz/dj-database-url;
license = licenses.bsd2;
};
}

View File

@ -1,18 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, django }: { stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-polymorphic"; pname = "django-polymorphic";
version = "2.0.2"; version = "2.0.2";
name = "${pname}-${version}";
src = fetchPypi { # PyPI tarball is missing some test files
inherit pname version; src = fetchFromGitHub {
sha256 = "e1821d7b5874509a158a0f22bebf544330e0944c481c5a3e6da6cac8887e4e88"; owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "18p84kdwpfp423vb2n38h840mj3bq0j57jx3cry7c8dznpi0vfi2";
}; };
checkInputs = [ django ]; checkInputs = [ dj-database-url ];
propagatedBuildInputs = [ django ]; propagatedBuildInputs = [ django ];
checkPhase = ''
${python.interpreter} runtests.py
'';
meta = { meta = {
homepage = https://github.com/django-polymorphic/django-polymorphic; homepage = https://github.com/django-polymorphic/django-polymorphic;
description = "Improved Django model inheritance with automatic downcasting"; description = "Improved Django model inheritance with automatic downcasting";

View File

@ -3,16 +3,16 @@
, numpy , numpy
, pytest , pytest
, pytestrunner , pytestrunner
, glibcLocales
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "fonttools"; pname = "fonttools";
version = "3.23.0"; version = "3.24.0";
name = "${pname}-${version}";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "9af97075be0395b631880a82ba88dcf694c8aa76b07a622bf5f650e8f8cff293"; sha256 = "d09126f443bc8797d1b7e76274e65f4c169c04722745953ecf536451b1d9a15f";
extension = "zip"; extension = "zip";
}; };
@ -23,8 +23,13 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytest pytest
pytestrunner pytestrunner
glibcLocales
]; ];
preCheck = ''
export LC_ALL="en_US.UTF-8"
'';
meta = { meta = {
homepage = https://github.com/fonttools/fonttools; homepage = https://github.com/fonttools/fonttools;
description = "A library to manipulate font files from Python"; description = "A library to manipulate font files from Python";

View File

@ -0,0 +1,27 @@
{ lib, buildPythonPackage, fetchPypi, pytest }:
buildPythonPackage rec {
version = "3.4";
pname = "ftputil";
src = fetchPypi {
inherit pname version;
sha256 = "374b01e174079e91babe2a462fbd6f6c00dbfbfa299dec04239ca4229fbf8762";
};
checkInputs = [ pytest ];
checkPhase = ''
touch Makefile
# Disable tests that require network access or access /home
py.test test \
-k "not test_public_servers and not test_real_ftp \
and not test_set_parser and not test_repr"
'';
meta = with lib; {
description = "High-level FTP client library (virtual file system and more)";
homepage = http://ftputil.sschwarzer.net/;
license = licenses.bsd2; # "Modified BSD license, says pypi"
};
}

View File

@ -0,0 +1,25 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k
, pbr, ldap, fixtures, testresources, testtools }:
buildPythonPackage rec {
name = "ldappool-${version}";
version = "2.2.0";
src = fetchPypi {
pname = "ldappool";
inherit version;
sha256 = "1akmzf51cjfvmd0nvvm562z1w9vq45zsx6fa72kraqgsgxhnrhqz";
};
nativeBuildInputs = [ pbr ];
propagatedBuildInputs = [ ldap ];
checkInputs = [ fixtures testresources testtools ];
meta = with lib; {
description = "A simple connector pool for python-ldap";
homepage = https://git.openstack.org/cgit/openstack/ldappool;
license = licenses.mpl20;
};
}

View File

@ -0,0 +1,22 @@
{ stdenv, lib, buildPythonPackage, fetchurl, cups, libiconv }:
buildPythonPackage rec {
pname = "pycups";
version = "1.9.73";
src = fetchurl {
url = "http://cyberelk.net/tim/data/pycups/pycups-${version}.tar.bz2";
sha256 = "c381be011889ca6f728598578c89c8ac9f7ab1e95b614474df9f2fa831ae5335";
};
buildInputs = [ cups ] ++ lib.optional stdenv.isDarwin libiconv;
# Wants to connect to CUPS
doCheck = false;
meta = with lib; {
description = "Python bindings for libcups";
homepage = http://cyberelk.net/tim/software/pycups/;
license = with licenses; [ gpl2Plus ];
};
}

View File

@ -4461,24 +4461,7 @@ in {
}; };
}; };
ftputil = buildPythonPackage rec { ftputil = callPackage ../development/python-modules/ftputil { };
version = "3.3";
name = "ftputil-${version}";
src = pkgs.fetchurl {
url = "mirror://pypi/f/ftputil/${name}.tar.gz";
sha256 = "1714w0v6icw2xjx5m54yv2qgkq49qwxwllq4gdb7wkz25iiapr8b";
};
disabled = isPy3k;
meta = {
description = "High-level FTP client library (virtual file system and more)";
homepage = https://pypi.python.org/pypi/ftputil;
platforms = platforms.linux;
license = licenses.bsd2; # "Modified BSD license, says pypi"
};
};
fudge = buildPythonPackage rec { fudge = buildPythonPackage rec {
name = "fudge-1.1.0"; name = "fudge-1.1.0";
@ -7093,6 +7076,8 @@ in {
}; };
}; };
dj-database-url = callPackage ../development/python-modules/dj-database-url { };
djmail = callPackage ../development/python-modules/djmail { }; djmail = callPackage ../development/python-modules/djmail { };
pillowfight = buildPythonPackage rec { pillowfight = buildPythonPackage rec {
@ -11612,23 +11597,7 @@ in {
}; };
}; };
ldappool = buildPythonPackage rec { ldappool = callPackage ../development/python-modules/ldappool { };
name = "ldappool-${version}";
version = "1.0";
src = pkgs.fetchurl {
url = "mirror://pypi/l/ldappool/${name}.tar.gz";
sha256 = "1akmzf51cjfvmd0nvvm562z1w9vq45zsx6fa72kraqgsgxhnrhqz";
};
# Judging from SyntaxError
disabled = isPy3k;
meta = with stdenv.lib; {
homepage = "https://github.com/mozilla-services/ldappool";
};
};
lz4 = buildPythonPackage rec { lz4 = buildPythonPackage rec {
name = "lz4-0.8.2"; name = "lz4-0.8.2";
@ -13029,27 +12998,7 @@ in {
}; };
}); });
pycups = buildPythonPackage rec { pycups = callPackage ../development/python-modules/pycups { };
name = "pycups-${version}";
version = "1.9.73";
src = pkgs.fetchurl {
url = "http://cyberelk.net/tim/data/pycups/pycups-${version}.tar.bz2";
sha256 = "c381be011889ca6f728598578c89c8ac9f7ab1e95b614474df9f2fa831ae5335";
};
buildInputs = [ pkgs.cups ];
# Wants to connect to CUPS
doCheck = false;
meta = {
description = "Python bindings for libcups";
homepage = http://cyberelk.net/tim/software/pycups/;
license = with licenses; [ gpl2Plus ];
};
};
pycurl = buildPythonPackage (rec { pycurl = buildPythonPackage (rec {
name = "pycurl-7.19.5.1"; name = "pycurl-7.19.5.1";