Merge master into staging

This commit is contained in:
Orivej Desh
2019-07-25 09:23:01 +00:00
193 changed files with 4440 additions and 1950 deletions

View File

@@ -2,10 +2,11 @@
, buildPythonPackage
, fetchPypi
, setuptools_scm
, pythonOlder
, isPy3k
, pytest
}:
if !(pythonOlder "3.3") then null else buildPythonPackage rec {
buildPythonPackage rec {
pname = "backports.functools_lru_cache";
version = "1.5";
@@ -15,7 +16,15 @@ if !(pythonOlder "3.3") then null else buildPythonPackage rec {
};
buildInputs = [ setuptools_scm ];
doCheck = false; # No proper test
checkInputs = [ pytest ];
checkPhase = ''
pytest
'';
# Test fail on Python 2
doCheck = isPy3k;
meta = {
description = "Backport of functools.lru_cache";

View File

@@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "zc.buildout";
version = "2.13.1";
version = "2.13.2";
src = fetchPypi {
inherit pname version;
sha256 = "3d14d07226963a517295dfad5879d2799e2e3b65b2c61c71b53cb80f5ab11484";
sha256 = "0a73s5q548l2vs2acqs3blkzd9sw6d7ci77fz1pc9156vn3dxm2x";
};
meta = with stdenv.lib; {

View File

@@ -1,39 +1,30 @@
{ stdenv, fetchPypi, buildPythonPackage, fetchpatch
, more-itertools, six
, pytest, pytestcov, portend
, backports_unittest-mock
{ stdenv, fetchPypi, buildPythonPackage
, more-itertools, six, setuptools_scm, setuptools-scm-git-archive
, pytest, pytestcov, portend, pytest-testmon, pytest-mock
, backports_unittest-mock, pyopenssl, requests, trustme, requests-unixsocket
, backports_functools_lru_cache }:
buildPythonPackage rec {
pname = "cheroot";
version = "6.3.3";
version = "6.5.5";
src = fetchPypi {
inherit pname version;
sha256 = "8e3ac15e1efffc81425a693e99b3c09d7ea4bf947255d8d4c38e2cf76f3a4d25";
sha256 = "f6a85e005adb5bc5f3a92b998ff0e48795d4d98a0fbb7edde47a7513d4100601";
};
patches = fetchpatch {
name = "cheroot-fix-setup-python3.patch";
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/cheroot-fix-setup-python3.patch?h=packages/python-cheroot&id=9b33cb0885b3c0d91adeacae23761a4321eb0e64";
sha256 = "1rlgz0qln536y00mfqlf0i9hz3f53id73wh47cg5q2vcsw1w2bpc";
};
nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ];
propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ];
checkInputs = [ pytest pytestcov portend backports_unittest-mock ];
# Disable testmon, it needs pytest-testmon, which we do not currently have in nikpkgs,
# and is only used to skip some tests that are already known to work.
postPatch = ''
substituteInPlace "./pytest.ini" --replace "--testmon" ""
substituteInPlace setup.py --replace "use_scm_version=True" "version=\"${version}\"" \
--replace "'setuptools_scm>=1.15.0'," "" \
--replace "'setuptools_scm_git_archive>=1.0'," "" \
'';
checkInputs = [ pytest pytestcov portend backports_unittest-mock pytest-mock pytest-testmon pyopenssl requests trustme requests-unixsocket ];
# Disable doctest plugin because times out
# Deselect test_bind_addr_unix on darwin because times out
# Deselect test_http_over_https_error on darwin because builtin cert fails
checkPhase = ''
py.test cheroot
substituteInPlace pytest.ini --replace "--doctest-modules" ""
pytest ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=cheroot/test/test_ssl.py::test_http_over_https_error --deselect=cheroot/test/test_server.py::test_bind_addr_unix"}
'';
meta = with stdenv.lib; {

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi
{ stdenv, buildPythonPackage, fetchPypi
, setuptools_scm
, cheroot, contextlib2, portend, routes, six, zc_lockfile
, backports_unittest-mock, objgraph, pathpy, pytest, pytestcov, backports_functools_lru_cache, requests_toolbelt
@@ -6,12 +6,12 @@
buildPythonPackage rec {
pname = "cherrypy";
version = "17.4.1";
version = "17.4.2";
src = fetchPypi {
pname = "CherryPy";
inherit version;
sha256 = "1kl17anzz535jgkn9qcy0c2m0zlafph0iv7ph3bb9mfrs2bgvagv";
sha256 = "ef1619ad161f526745d4f0e4e517753d9d985814f1280e330661333d2ba05cdf";
};
propagatedBuildInputs = [
@@ -25,10 +25,10 @@ buildPythonPackage rec {
];
checkPhase = ''
pytest
pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"}
'';
meta = with lib; {
meta = with stdenv.lib; {
homepage = https://www.cherrypy.org;
description = "A pythonic, object-oriented HTTP framework";
license = licenses.bsd3;

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
, setuptools_scm
, cheroot, portend, more-itertools, zc_lockfile, routes
, objgraph, pytest, pytestcov, pathpy, requests_toolbelt, pytest-services
@@ -29,11 +29,13 @@ buildPythonPackage rec {
objgraph pytest pytestcov pathpy requests_toolbelt pytest-services
];
# Disable doctest plugin because times out
checkPhase = ''
pytest
substituteInPlace pytest.ini --replace "--doctest-modules" ""
pytest --deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block"}
'';
meta = with lib; {
meta = with stdenv.lib; {
homepage = https://www.cherrypy.org;
description = "A pythonic, object-oriented HTTP framework";
license = licenses.bsd3;

View File

@@ -2,6 +2,7 @@
, buildPythonPackage
, fetchPypi
, fetchpatch
, stdenv
, sphinx
, numpydoc
, pytest
@@ -38,10 +39,10 @@ buildPythonPackage rec {
checkInputs = [ sphinx numpydoc pytest ];
propagatedBuildInputs = [ python-lz4 ];
# test_disk_used is broken
# https://github.com/joblib/joblib/issues/57
# test_disk_used is broken: https://github.com/joblib/joblib/issues/57
# test_dispatch_multiprocessing is broken only on Darwin.
checkPhase = ''
py.test joblib -k "not test_disk_used"
py.test -k 'not test_disk_used${lib.optionalString (stdenv.isDarwin) " and not test_dispatch_multiprocessing"}' joblib/test
'';
meta = {

View File

@@ -1,10 +1,11 @@
{ lib
{ stdenv
, buildPythonPackage
, fetchPypi
, cmake
, numpy
, scipy
, scikitlearn
, llvmPackages ? null
}:
buildPythonPackage rec {
@@ -20,6 +21,19 @@ buildPythonPackage rec {
cmake
];
# we never actually explicitly call the install command so this is the only way
# to inject these options to it - however, openmp-library doesn't appear to have
# any effect, so we have to inject it into NIX_LDFLAGS manually below
postPatch = stdenv.lib.optionalString stdenv.cc.isClang ''
cat >> setup.cfg <<EOF
[install]
openmp-include-dir=${llvmPackages.openmp}/include
openmp-library=${llvmPackages.openmp}/lib/libomp.dylib
EOF
'';
propagatedBuildInputs = [
numpy
scipy
@@ -28,6 +42,8 @@ buildPythonPackage rec {
postConfigure = ''
export HOME=$(mktemp -d)
'' + stdenv.lib.optionalString stdenv.cc.isClang ''
export NIX_LDFLAGS="$NIX_LDFLAGS -L${llvmPackages.openmp}/lib -lomp"
'';
# The pypi package doesn't distribute the tests from the GitHub
@@ -35,10 +51,10 @@ buildPythonPackage rec {
# `make check`.
doCheck = false;
meta = with lib; {
meta = with stdenv.lib; {
description = "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework";
homepage = https://github.com/Microsoft/LightGBM;
license = licenses.mit;
maintainers = with lib.maintainers; [ teh costrouc ];
maintainers = with maintainers; [ teh costrouc ];
};
}

View File

@@ -1,54 +1,78 @@
{ buildPythonPackage, fetchPypi, jinja2, werkzeug, flask, cfn-lint
, requests, pytz, backports_tempfile, cookies, jsondiff, botocore, aws-xray-sdk, docker, responses
, six, boto, httpretty, xmltodict, nose, sure, boto3, freezegun, dateutil, mock, pyaml, python-jose }:
{ lib, buildPythonPackage, fetchPypi, isPy27
, aws-xray-sdk
, backports_tempfile
, boto
, boto3
, botocore
, cfn-lint
, docker
, flask
, freezegun
, jinja2
, jsondiff
, mock
, nose
, pyaml
, python-jose
, pytz
, requests
, responses
, six
, sshpubkeys
, sure
, werkzeug
, xmltodict
}:
buildPythonPackage rec {
pname = "moto";
version = "1.3.8";
version = "1.3.10";
src = fetchPypi {
inherit pname version;
sha256 = "9cb02134148fbe3ed81f11d6ab9bd71bbd6bc2db7e59a45de77fb1d0fedb744e";
sha256 = "0vlq015irqqwdknk1an7qqkg1zjk18c7jd89r7zbxxfwy3bgzwwj";
};
postPatch = ''
# regarding aws-xray-sdk: https://github.com/spulec/moto/commit/31eac49e1555c5345021a252cb0c95043197ea16
# regarding python-jose: https://github.com/spulec/moto/pull/1927
substituteInPlace setup.py \
--replace "aws-xray-sdk<0.96," "aws-xray-sdk" \
--replace "jsondiff==1.1.1" "jsondiff>=1.1.1" \
--replace "python-jose<3.0.0" "python-jose<4.0.0"
--replace "jsondiff==1.1.2" "jsondiff~=1.1"
sed -i '/datetime/d' setup.py # should be taken care of by std library
'';
propagatedBuildInputs = [
aws-xray-sdk
boto
boto3
botocore
cfn-lint
dateutil
flask
httpretty
docker
flask # required for server
jinja2
pytz
werkzeug
requests
six
xmltodict
jsondiff
mock
pyaml
backports_tempfile
cookies
jsondiff
botocore
docker
responses
python-jose
];
pytz
six
requests
responses
sshpubkeys
werkzeug
xmltodict
] ++ lib.optionals isPy27 [ backports_tempfile ];
checkInputs = [ boto3 nose sure freezegun ];
checkInputs = [ boto3 freezegun nose sure ];
checkPhase = "nosetests";
checkPhase = ''nosetests -v ./tests/ \
-e test_invoke_function_from_sns \
-e test_invoke_requestresponse_function \
-e test_context_manager \
-e test_decorator_start_and_stop'';
# TODO: make this true; I think lots of the tests want network access but we can probably run the others
doCheck = false;
meta = with lib; {
description = "Allows your tests to easily mock out AWS Services";
homepage = https://github.com/spulec/moto;
license = licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "nixpkgs";
version = "0.2.3";
version = "0.2.4";
disabled = ! pythonAtLeast "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "12ycbv31g4qv14aq6hfb85hhx026lgvzqfsrkpzb64na0c1yjcvn";
sha256 = "0dlvq4bpamhlva86042wlc0xxfsxlpdgm2adfb1c6y3vjgbm0nvd";
};
buildInputs = [ pbr ];

View File

@@ -9,11 +9,11 @@
buildPythonPackage rec {
pname = "nose2";
version = "0.8.0";
version = "0.9.1";
src = fetchPypi {
inherit pname version;
sha256 = "9052f2b46807b63d9bdf68e0768da1f8386368889b50043fd5d0889c470258f3";
sha256 = "16drs4bc2wvgwwi1pf6pmk6c00pl16vs1v7djc4a8kwpsxpibphf";
};
propagatedBuildInputs = [ six coverage ]

View File

@@ -21,7 +21,7 @@ buildPythonPackage rec {
checkInputs = [ pytest ];
checkPhase = ''
py.test
py.test --deselect=test_portend.py::TestChecker::test_check_port_listening
'';
meta = with stdenv.lib; {

View File

@@ -6,11 +6,11 @@
buildPythonPackage rec {
pname = "pycountry";
version = "18.12.8";
version = "19.7.15";
src = fetchPypi {
inherit pname version;
sha256 = "1phn1av57jbm166facjk6r8gw4pf886q4wymjc443k8m5c5h5i4f";
sha256 = "15lhv18za0zv36laksr86rszjhp0slmqzcylm6ds9vpd7gyqprb8";
};
meta = with stdenv.lib; {

View File

@@ -13,13 +13,13 @@
buildPythonPackage rec {
pname = "pysonos";
version = "0.0.14";
version = "0.0.21";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "6ebab661eb3ff9f814139924c18a87d0b1cab8a6af98d323e2b1ee313ed856c9";
sha256 = "0x2nznjnm721qw9nys5ap3b6hq9s48bsd1yj5xih50pvn0rf0nz2";
};
propagatedBuildInputs = [ xmltodict requests ifaddr ];

View File

@@ -7,11 +7,11 @@
buildPythonPackage rec {
pname = "pytest-testmon";
version = "0.9.16";
version = "0.9.18";
src = fetchPypi {
inherit pname version;
sha256 = "df00594e55f8f8f826e0e345dc23863ebac066eb749f8229c515a0373669c5bb";
sha256 = "05648f9b22aeeda9d32e61b46fa78c9ff28f217d69005b3b19ffb75d5992187e";
};
buildInputs = [ pytest ];
@@ -21,7 +21,7 @@ buildPythonPackage rec {
checkInputs = [ pytest ];
checkPhase = ''
pytest test
pytest --deselect=test/test_testmon.py::TestmonDeselect::test_dependent_testmodule
'';
meta = with lib; {

View File

@@ -1,8 +1,8 @@
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, glibcLocales, mock, pytest, botocore,
{ stdenv, buildPythonPackage, fetchPypi, glibcLocales, mock, pytest, botocore,
testfixtures, pillow, six, twisted, w3lib, lxml, queuelib, pyopenssl,
service-identity, parsel, pydispatcher, cssselect, lib }:
buildPythonPackage rec {
version = "1.7.1";
version = "1.7.2";
pname = "Scrapy";
checkInputs = [ glibcLocales mock pytest botocore testfixtures pillow ];
@@ -16,12 +16,6 @@ buildPythonPackage rec {
# root and readonly. As a consequence scrapy can't edit the
# project templates.
./permissions-fix.patch
# Fix configparser import for python2. See: https://github.com/scrapy/scrapy/pull/3887
(fetchpatch {
url = "https://github.com/scrapy/scrapy/commit/21345dc9ec60dcc1cd2e5c0eace5788aa502ce23.patch";
sha256 = "09834rcjyggvyj6zignvfga2xbqkknygly5p4a96k2mvz0xn3v6z";
})
];
LC_ALL="en_US.UTF-8";
@@ -37,7 +31,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "da8987d199092c3bb33d4d1d021507cd933aa67f5177e2d36f31343e8a6bd7f1";
sha256 = "7a4ed68cfb44dc86e1895f0fb46257ee4adb1090754ac21faec205763f054464";
};
postInstall = ''

View File

@@ -0,0 +1,23 @@
{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm, pytest }:
buildPythonPackage rec {
pname = "setuptools-scm-git-archive";
version = "1.1";
src = fetchPypi {
inherit version;
pname = "setuptools_scm_git_archive";
sha256 = "6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062";
};
nativeBuildInputs = [ setuptools_scm ];
checkInputs = [ pytest ];
meta = with stdenv.lib; {
description = "setuptools_scm plugin for git archives";
homepage = "https://github.com/Changaco/setuptools_scm_git_archive";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}

View File

@@ -0,0 +1,25 @@
{ lib, buildPythonPackage, fetchFromGitHub
, cryptography
, ecdsa
}:
buildPythonPackage rec {
version = "3.1.0";
pname = "sshpubkeys";
src = fetchFromGitHub {
owner = "ojarva";
repo = "python-${pname}";
rev = "v${version}";
sha256 = "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq";
};
propagatedBuildInputs = [ cryptography ecdsa ];
meta = with lib; {
description = "OpenSSH Public Key Parser for Python";
homepage = https://github.com/ojarva/python-sshpubkeys;
license = licenses.bsd3;
maintainers = [ ];
};
}

View File

@@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchPypi
, setuptools_scm
, setuptools_scm, pytest, freezegun, backports_unittest-mock
, six, pytz, jaraco_functools }:
buildPythonPackage rec {
@@ -11,12 +11,17 @@ buildPythonPackage rec {
sha256 = "cb60b1d2b1664104e307f8e5269d7f4acdb077c82e35cd57246ae14a3427d2d6";
};
doCheck = false;
buildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ six pytz jaraco_functools ];
checkInputs = [ pytest freezegun backports_unittest-mock ];
checkPhase = ''
substituteInPlace pytest.ini --replace "--flake8" ""
pytest
'';
meta = with lib; {
description = "Objects and routines pertaining to date and time";
homepage = https://github.com/jaraco/tempora;