Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2020-04-05 08:33:39 +02:00
78 changed files with 3362 additions and 3124 deletions

View File

@@ -29,7 +29,9 @@ buildPythonPackage rec {
cvxopt
ecos
multiprocess
numpy
osqp
scipy
scs
six
];
@@ -39,11 +41,11 @@ buildPythonPackage rec {
nosetests
'';
meta = {
meta = with lib; {
description = "A domain-specific language for modeling convex optimization problems in Python.";
homepage = "https://www.cvxpy.org/";
downloadPage = "https://github.com/cvxgrp/cvxpy/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ drewrisinger ];
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ];
};
}

View File

@@ -1,49 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, aiofiles
, click
, click-default-group
, janus
, jinja2
, hupper
, pint
, pluggy
, pytest
, uvicorn
# Check Inputs
, pytestCheckHook
, pytestrunner
, pytest-asyncio
, black
, aiohttp
, beautifulsoup4
, uvicorn
, asgiref
, aiofiles
}:
buildPythonPackage rec {
pname = "datasette";
version = "0.35";
version = "0.39";
src = fetchFromGitHub {
owner = "simonw";
repo = "datasette";
rev = version;
sha256 = "0v6af7agg27lapz1nbab07595v4hl2x5wm2f03drj81f7pm8y7hc";
sha256 = "07d46512bc9sdan9lv39sf1bwlf7vf1bfhcsm825vk7sv7g9kczd";
};
nativeBuildInputs = [ pytestrunner ];
propagatedBuildInputs = [
aiofiles
click
click-default-group
janus
jinja2
hupper
pint
pluggy
uvicorn
aiofiles
];
checkInputs = [
pytest
pytestCheckHook
pytest-asyncio
aiohttp
beautifulsoup4
@@ -53,24 +56,32 @@ buildPythonPackage rec {
postConfigure = ''
substituteInPlace setup.py \
--replace "click-default-group==1.2" "click-default-group" \
--replace "Sanic==0.7.0" "Sanic" \
--replace "hupper==1.0" "hupper" \
--replace "pint~=0.8.1" "pint" \
--replace "pluggy~=0.12.0" "pint" \
--replace "Jinja2==2.10.1" "Jinja2" \
--replace "uvicorn~=0.8.4" "uvicorn"
--replace "click~=7.1.1" "click" \
--replace "click-default-group~=1.2.2" "click-default-group" \
--replace "Jinja2~=2.10.3" "Jinja2" \
--replace "hupper~=1.9" "hupper" \
--replace "pint~=0.9" "pint" \
--replace "pluggy~=0.13.0" "pint" \
--replace "uvicorn~=0.11" "uvicorn" \
--replace "aiofiles~=0.4.0" "aiofiles" \
--replace "janus~=0.4.0" "janus" \
--replace "PyYAML~=5.3" "PyYAML"
'';
# many tests require network access
# test_black fails on darwin
checkPhase = ''
pytest --ignore tests/test_api.py \
--ignore tests/test_csv.py \
--ignore tests/test_html.py \
--ignore tests/test_black.py \
-k 'not facet'
'';
dontUseSetuptoolsCheck = true;
pytestFlagsArray = [
"--ignore=tests/test_api.py"
"--ignore=tests/test_csv.py"
"--ignore=tests/test_html.py"
"--ignore=tests/test_docs.py"
"--ignore=tests/test_black.py"
];
disabledTests = [
"facet"
"_invalid_database" # checks error message when connecting to invalid database
];
meta = with lib; {
description = "An instant JSON API for your SQLite databases";

View File

@@ -18,9 +18,7 @@ buildPythonPackage rec {
sha256 = "0bkj1xfp6mnvk1i9hl5awsmwi07q6iwwsjznd7kvrx5m19i6dbnx";
};
nativeBuildInputs = [
pytestCheckHook
] ++ lib.optional isPy27 mock;
nativeBuildInputs = lib.optional isPy27 mock;
propagatedBuildInputs = [
paramiko
@@ -29,12 +27,15 @@ buildPythonPackage rec {
websocket_client
] ++ lib.optional isPy27 backports_ssl_match_hostname;
checkInputs = [
pytestCheckHook
];
pytestFlagsArray = [ "tests/unit" ];
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ];
# skip setuptoolsCheckPhase
doCheck = false;
dontUseSetuptoolsCheck = true;
meta = with lib; {
description = "An API client for docker written in Python";

View File

@@ -4,10 +4,9 @@
, cmake
, future
, numpy
# check inputs
, scipy
# check inputs
, pytestCheckHook
, mkl
}:
buildPythonPackage rec {
@@ -23,16 +22,15 @@ buildPythonPackage rec {
dontUseCmakeConfigure = true;
propagatedBuildInputs = [
numpy
future
numpy
scipy
];
checkInputs = [ scipy pytestCheckHook mkl ];
pythonImportsCheck = [ "osqp" ];
dontUseSetuptoolsCheck = true; # running setup.py fails if false
preCheck = ''
export LD_LIBRARY_PATH=${lib.strings.makeLibraryPath [ mkl ]}:$LD_LIBRARY_PATH;
'';
checkInputs = [ pytestCheckHook ];
dontUseSetuptoolsCheck = true; # don't run checks twice
disabledTests = [ "mkl_" ];
meta = with lib; {
description = "The Operator Splitting QP Solver";
@@ -44,8 +42,8 @@ buildPythonPackage rec {
where x in R^n is the optimization variable
'';
homepage = "https://osqp.org/";
downloadPage = "https://github.com/oxfordcontrol/osqp";
downloadPage = "https://github.com/oxfordcontrol/osqp-python/releases";
license = licenses.asl20;
maintainers = with lib.maintainers; [ drewrisinger ];
maintainers = with maintainers; [ drewrisinger ];
};
}

View File

@@ -2,20 +2,40 @@
, buildPythonPackage
, fetchPypi
, isPy27
, pythonOlder
, funcsigs
, setuptools_scm
# Check Inputs
, pytestCheckHook
, numpy
, matplotlib
, uncertainties
}:
buildPythonPackage rec {
pname = "pint";
version = "0.9";
version = "0.11";
src = fetchPypi {
inherit version;
pname = "Pint";
sha256 = "32d8a9a9d63f4f81194c0014b3b742679dce81a26d45127d9810a68a561fe4e2";
sha256 = "0kfgnmcs6z9ndhzvwg2xzhpwxgyyagdsdz5dns1jy40fa1q113rh";
};
propagatedBuildInputs = lib.optional isPy27 funcsigs;
disabled = pythonOlder "3.6";
propagatedBuildInputs = [
setuptools_scm
] ++ lib.optional isPy27 funcsigs;
# Test suite explicitly requires pytest
checkInputs = [
pytestCheckHook
numpy
matplotlib
uncertainties
];
dontUseSetuptoolsCheck = true;
meta = with lib; {
description = "Physical quantities module";

View File

@@ -1,22 +1,35 @@
{ stdenv, fetchFromGitHub
, buildPythonPackage, python-jose, pyjwt, requests, deprecated, httpretty }:
{ stdenv
, buildPythonPackage
, cryptography
, deprecated
, fetchFromGitHub
, httpretty
, isPy3k
, parameterized
, pyjwt
, pytestCheckHook
, requests }:
buildPythonPackage rec {
pname = "PyGithub";
version = "1.45";
version = "1.47";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "PyGithub";
repo = "PyGithub";
rev = "v${version}";
sha256 = "1aiyqwdxpcr7yzz7aqmmjn1g2ajs5bpbln4sax5zw19dqi6qgp9z";
sha256 = "0zvp1gib2lryw698vxkbdv40n3lsmdlhwp7vdcg41dqqa5nfryhn";
};
propagatedBuildInputs = [ python-jose pyjwt requests deprecated httpretty ];
checkInputs = [ httpretty parameterized pytestCheckHook ];
propagatedBuildInputs = [ cryptography deprecated pyjwt requests ];
# Test suite makes REST calls against github.com
doCheck = false;
meta = with stdenv.lib; {
homepage = https://github.com/PyGithub/PyGithub;
homepage = "https://github.com/PyGithub/PyGithub";
description = "A Python (2 and 3) library to access the GitHub API v3";
platforms = platforms.all;
license = licenses.gpl3;

View File

@@ -6,16 +6,17 @@
, libuv
, psutil
, isPy27
, pythonAtLeast
, CoreServices
, ApplicationServices
# Check Inputs
, pytestCheckHook
# , pytest-asyncio
}:
buildPythonPackage rec {
pname = "uvloop";
version = "0.14.0";
# python 3.8 hangs on tests, assuming it's subtly broken with race condition
disabled = isPy27 || pythonAtLeast "3.8";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
@@ -28,20 +29,44 @@ buildPythonPackage rec {
libuv
] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
postPatch = ''
# Removing code linting tests, which we don't care about
rm tests/test_sourcecode.py
'';
pythonImportsCheck = [
"uvloop"
"uvloop.loop"
];
checkInputs = [ pyopenssl psutil ];
dontUseSetuptoolsCheck = true;
checkInputs = [ pytestCheckHook pyopenssl psutil ];
pytestFlagsArray = [
# from pytest.ini, these are NECESSARY to prevent failures
"--capture=no"
"--assert=plain"
"--tb=native"
# ignore code linting tests
"--ignore=tests/test_sourcecode.py"
];
disabledTests = [
"test_sock_cancel_add_reader_race" # asyncio version of test is supposed to be skipped but skip doesn't happen. uvloop version runs fine
];
# force using installed/compiled uvloop vs source by moving tests to temp dir
preCheck = ''
export TEST_DIR=$(mktemp -d)
cp -r tests $TEST_DIR
pushd $TEST_DIR
'';
postCheck = ''
popd
'';
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Fast implementation of asyncio event loop on top of libuv";
homepage = https://github.com/MagicStack/uvloop;
homepage = "https://github.com/MagicStack/uvloop";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ costrouc ];
};
}