Merge branch 'staging-next' into staging

This commit is contained in:
Jan Tojnar
2020-09-29 00:12:29 +02:00
306 changed files with 4799 additions and 1779 deletions

View File

@@ -7,9 +7,8 @@
, pybind11
, pyfma
, eigen
, pytest
, pytestCheckHook
, matplotlib
, perfplot
, isPy27
}:
@@ -35,9 +34,8 @@ buildPythonPackage rec {
];
checkInputs = [
pytest
pytestCheckHook
matplotlib
perfplot
];
postConfigure = ''
@@ -49,9 +47,15 @@ buildPythonPackage rec {
export HOME=$(mktemp -d)
'';
checkPhase = ''
pytest test
# performance tests aren't useful to us and disabling them allows us to
# decouple ourselves from an unnecessary build dep
preCheck = ''
for f in test/test*.py ; do
substituteInPlace $f --replace 'import perfplot' ""
done
'';
disabledTests = [ "test_speed_comparison1" "test_speed_comparison2" ];
pythonImportsCheck = [ "accupy" ];
meta = with lib; {
description = "Accurate sums and dot products for Python";

View File

@@ -1,5 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi
, six, click, requests, pytz, tabulate, pythonOlder
, six, click, requests, requests-hawk, pytz, tabulate, pythonOlder
}:
buildPythonPackage rec {
@@ -11,7 +11,7 @@ buildPythonPackage rec {
sha256 = "49e0862c756d644e9349f5040dd59d135cd871ffeaea5fc288eb3a2e818cf61a";
};
propagatedBuildInputs = [ six click requests pytz tabulate ];
propagatedBuildInputs = [ six click requests requests-hawk pytz tabulate ];
doCheck = false;

View File

@@ -7,11 +7,11 @@
buildPythonPackage rec {
pname = "biopython";
version = "1.77";
version = "1.78";
src = fetchPypi {
inherit pname version;
sha256 = "fb1936e9ca9e7af8de1050e84375f23328e04b801063edf0ad73733494d8ec42";
sha256 = "1ee0a0b6c2376680fea6642d5080baa419fd73df104a62d58a8baf7a8bbe4564";
};
disabled = !isPy3k;

View File

@@ -1,17 +1,22 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
}:
buildPythonPackage rec {
pname = "Chameleon";
version = "3.8.1";
src = fetchPypi {
inherit pname version;
sha256 = "adf9609a2fa4ad20deb390605495f9a5d617b737bfbd86e51a49bbac2acaf316";
# tests not included in pypi tarball
src = fetchFromGitHub {
owner = "malthe";
repo = "chameleon";
rev = version;
sha256 = "0nf8x4w2vh1a31wdb86nnvlic9xmr23j3in1f6fq4z6mv2jkwa87";
};
pythonImportsCheck = [ "chameleon" ];
meta = with stdenv.lib; {
homepage = "https://chameleon.readthedocs.io/";
description = "Fast HTML/XML Template Compiler";

View File

@@ -2,8 +2,9 @@
, buildPythonPackage
, fetchPypi
, isPy3k
, pytest
, pytestCheckHook
, sphinx
, stdenv
}:
buildPythonPackage rec {
@@ -17,15 +18,18 @@ buildPythonPackage rec {
disabled = !isPy3k;
checkInputs = [ pytest sphinx ];
checkInputs = [ pytestCheckHook sphinx ];
__darwinAllowLocalNetworking = true;
# test_aside_basic times out,
# test_aside_cancel fails because modifies PYTHONPATH and cant find pytest
checkPhase = ''
pytest --deselect tests/test_task.py::test_aside_basic --deselect tests/test_task.py::test_aside_cancel -k "not test_ssl_outgoing"
'';
disabledTests = [
"test_aside_basic" # times out
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
"test_ssl_outgoing" # touches network
] ++ lib.optionals (stdenv.isDarwin) [
"test_unix_echo" # socket bind error on hydra when built with other packages
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
];
meta = with lib; {
homepage = "https://github.com/dabeaz/curio";

View File

@@ -1,45 +1,63 @@
{ stdenv, lib, buildPythonPackage, fetchPypi, substituteAll, pythonOlder
, pipInstallHook, writeText
, blessed
, docutils
, libcxx
, libcxxabi
, llvm
, openmp
, pytest
, pytestCheckHook
, typesentry
}:
buildPythonPackage rec {
pname = "datatable";
version = "0.10.1";
version = "0.11.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "3ce5257c0c4afa96e2b14ca47a0aaf73add195b11de48f4adda50b5ede927436";
sha256 = "19c602711e00f72e9ae296d8fa742d46da037c2d3a2d254bdf68f817a8da76bb";
};
# authors seem to have created their own build system
format = "other";
patches = lib.optionals stdenv.isDarwin [
# Replace the library auto-detection with hardcoded paths.
(substituteAll {
src = ./hardcode-library-paths.patch;
# tarball doesn't appear to have been shipped totally ready-to-build
postPatch = ''
substituteInPlace ci/ext.py \
--replace \
'shell_cmd(["git"' \
'"0000000000000000000000000000000000000000" or shell_cmd(["git"'
echo '${version}' > VERSION.txt
'';
DT_RELEASE = "1";
libomp_dylib = "${lib.getLib openmp}/lib/libomp.dylib";
libcxx_dylib = "${lib.getLib libcxx}/lib/libc++.1.dylib";
libcxxabi_dylib = "${lib.getLib libcxxabi}/lib/libc++abi.dylib";
})
];
buildPhase = ''
python ci/ext.py wheel
'';
propagatedBuildInputs = [ typesentry blessed ];
buildInputs = [ llvm ] ++ lib.optionals stdenv.isDarwin [ openmp ];
checkInputs = [ docutils pytest ];
buildInputs = [ llvm pipInstallHook ];
checkInputs = [ docutils pytestCheckHook ];
LLVM = llvm;
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${libcxx}/include/c++/v1";
checkPhase = ''
mv datatable datatable.hidden
pytest
'';
pytestFlagsArray = let
# ini file (not included in tarball) required to change python_files setting,
pytestIni = writeText "pytest.ini" ''
[pytest]
python_files = test_*.py test-*.py
'';
in [
"-c ${pytestIni}"
];
disabledTests = [
# skip tests which are irrelevant to our installation or use way too much memory
"test_xfunction_paths"
"test_fread_from_cmd2"
"test_cast_huge_to_str"
"test_create_large_string_column"
];
pythonImportsCheck = [ "datatable" ];
meta = with lib; {
description = "data.table for Python";

View File

@@ -1,43 +0,0 @@
diff --git a/ci/setup_utils.py b/ci/setup_utils.py
index 66b385a..6255af0 100644
--- a/ci/setup_utils.py
+++ b/ci/setup_utils.py
@@ -600,37 +600,7 @@ def find_linked_dynamic_libraries():
them as a list of absolute paths.
"""
with TaskContext("Find the required dynamic libraries") as log:
- llvm = get_llvm()
- libs = required_link_libraries()
- resolved = []
- for libname in libs:
- if llvm:
- fullpath = os.path.join(llvm, "lib", libname)
- if os.path.isfile(fullpath):
- resolved.append(fullpath)
- log.info("Library `%s` found at %s" % (libname, fullpath))
- continue
- else:
- log.info("%s does not exist" % fullpath)
- # Rely on the shell `locate` command to find the dynamic libraries.
- proc = subprocess.Popen(["locate", libname], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, stderr = proc.communicate()
- if proc.returncode == 0:
- results = stdout.decode().strip().split("\n")
- results = [r for r in results if r]
- if results:
- results.sort(key=len)
- fullpath = results[0]
- assert os.path.isfile(fullpath), "Invalid path: %r" % (fullpath,)
- resolved.append(fullpath)
- log.info("Library `%s` found at %s" % (libname, fullpath))
- continue
- else:
- log.fatal("Cannot locate dynamic library `%s`" % libname)
- else:
- log.fatal("`locate` command returned the following error:\n%s"
- % stderr.decode())
+ resolved = ["@libomp_dylib@", "@libcxx_dylib@", "@libcxxabi_dylib@"]
return resolved

View File

@@ -0,0 +1,36 @@
{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytest }:
buildPythonPackage rec {
pname = "entrypoint2";
version = "0.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "15dya04884armqjdyqz1jgachkqgh9dc3p25lvyz9afvg73k2qav";
};
propagatedBuildInputs = [ ];
pythonImportsCheck = [ "entrypoint2" ];
# argparse is part of the standardlib
prePatch = ''
substituteInPlace setup.py --replace "argparse" ""
'';
checkInputs = [ EasyProcess pathpy pytest ];
# 0.2.1 has incompatible pycache files included
# https://github.com/ponty/entrypoint2/issues/8
checkPhase = ''
rm -rf tests/__pycache__
pytest tests
'';
meta = with lib; {
description = "Easy to use command-line interface for python modules";
homepage = "https://github.com/ponty/entrypoint2/";
license = licenses.bsd2;
maintainers = with maintainers; [ austinbutler ];
};
}

View File

@@ -16,6 +16,9 @@ buildPythonPackage rec {
# FIXME: package zstandard
# removing the test dependency for now
substituteInPlace setup.py --replace "'zstandard'," ""
# workaround for https://github.com/dask/fastparquet/issues/517
rm fastparquet/test/test_partition_filters_specialstrings.py
'';
nativeBuildInputs = [ pytestrunner ];

View File

@@ -4,18 +4,20 @@
, pythonOlder
, pytestCheckHook
, numpy
, stdenv
, isPy38
}:
buildPythonPackage rec {
pname = "fsspec";
version = "0.7.4";
version = "0.8.3";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "intake";
repo = "filesystem_spec";
rev = version;
sha256 = "0ylslmkzc803050yh8dl6cagabb9vrygz6w2zsmglzn4v9sz6jgd";
sha256 = "0mfy0wxjfwwnp5q2afhhfbampf0fk71wsv512pi9yvrkzzfi1hga";
};
checkInputs = [
@@ -27,6 +29,8 @@ buildPythonPackage rec {
# Test assumes user name is part of $HOME
# AssertionError: assert 'nixbld' in '/homeless-shelter/foo/bar'
"test_strip_protocol_expanduser"
] ++ lib.optionals (stdenv.isDarwin && isPy38) [
"test_modified" # fails on hydra, works locally
];
meta = with lib; {

View File

@@ -1,10 +1,10 @@
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, substituteAll
, python, utillinux, pygit2, gitMinimal, git-annex
, python, utillinux, pygit2, gitMinimal, git-annex, cacert
}:
buildPythonPackage rec {
pname = "git-annex-adapter";
version = "0.2.1";
version = "0.2.2";
disabled = !isPy3k;
@@ -13,7 +13,7 @@ buildPythonPackage rec {
owner = "alpernebbi";
repo = pname;
rev = "v${version}";
sha256 = "146q1jhcfc7f96ajkhjffskkljk2xzivs5ih5clb8qx0sh7mj097";
sha256 = "0666vqspgnvmfs6j3kifwyxr6zmxjs0wlwis7br4zcq0gk32zgdx";
};
patches = [
@@ -28,11 +28,12 @@ buildPythonPackage rec {
utillinux # `rev` is needed in tests/test_process.py
];
propagatedBuildInputs = [ pygit2 ];
propagatedBuildInputs = [ pygit2 cacert ];
checkPhase = ''
${python.interpreter} -m unittest
'';
pythonImportsCheck = [ "git_annex_adapter" ];
meta = with stdenv.lib; {
homepage = "https://github.com/alpernebbi/git-annex-adapter";

View File

@@ -6,11 +6,11 @@
buildPythonPackage rec {
pname = "hg-evolve";
version = "10.0.1";
version = "10.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "9468b3e2721744b077413c3d4a6b321b61370d4c87b90afa40dc2b48ad877d4b";
sha256 = "75892623258339613528df45dcd1004786bf73e8d95407886d79bc4567fbde4d";
};
doCheck = false;

View File

@@ -1,9 +1,11 @@
{ stdenv, buildPythonPackage, fetchPypi }:
{ buildPythonPackage, fetchPypi, isPy3k, stdenv }:
buildPythonPackage rec {
pname = "lmtpd";
version = "6.2.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "2c6825d2ffa1de099440411a742f58e1b3e8deeb3345adcfd4c2c38d4baf62b3";

View File

@@ -0,0 +1,29 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k }:
buildPythonPackage rec {
pname = "mss";
version = "6.0.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0dicp55adbqxb7hqlck95hngb1klv5s26lszw3xim30k18bwqaxl";
};
propagatedBuildInputs = [ ];
# By default it attempts to build Windows-only functionality
prePatch = ''
rm mss/windows.py
'';
# Skipping tests due to most relying on DISPLAY being set
pythonImportsCheck = [ "mss" ];
meta = with lib; {
description = "Cross-platform multiple screenshots module in pure Python";
homepage = "https://github.com/BoboTiG/mss/";
license = licenses.mit;
maintainers = with maintainers; [ austinbutler ];
};
}

View File

@@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "pivy";
version = "0.6.5a2";
version = "0.6.5";
src = fetchFromGitHub {
owner = "FreeCAD";
owner = "coin3d";
repo = "pivy";
rev = version;
sha256 = "1w03jaha36bjyfaz8hchnv8yrkm5715w15crhd3qrlagz8fs38hm";
sha256 = "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx";
};
nativeBuildInputs = with pkgs; [

View File

@@ -6,14 +6,14 @@
buildPythonPackage rec {
pname = "psautohint";
version = "2.1.0";
version = "2.1.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "adobe-type-tools";
repo = pname;
sha256 = "1k1rx1adqxdxj5v3788lwnvygylp73sps1p0q44hws2vmsag2s8r";
sha256 = "00n9bycjmvx1fb4332bdj53f01q86ajndrvid9idpiyzybmd5vp4";
rev = "v${version}";
fetchSubmodules = true; # data dir for tests
};

View File

@@ -1,9 +1,11 @@
{ lib, buildPythonPackage, fetchFromGitHub, setuptools_scm, toml, pytest }:
{ buildPythonPackage, isPy3k, lib, fetchFromGitHub, setuptools_scm, toml, pytest }:
buildPythonPackage rec {
pname = "pure_eval";
version = "0.1.0";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "alexmojaki";
repo = pname;

View File

@@ -1,9 +1,11 @@
{ buildPythonPackage, stdenv, fetchPypi, six, pytest }:
{ buildPythonPackage, isPy3k, stdenv, fetchPypi, six, pytest }:
buildPythonPackage rec {
pname = "pybase64";
version = "1.0.1";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "6ced40531bffc81bafc790d5c0d2f752e281b3b00fd6ff4e79385c625e5dbab1";

View File

@@ -1,10 +1,12 @@
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, graphviz
{ stdenv, buildPythonPackage, isPy3k, fetchPypi, substituteAll, graphviz
, pkgconfig, doctest-ignore-unicode, mock, nose }:
buildPythonPackage rec {
pname = "pygraphviz";
version = "1.6";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "411ae84a5bc313e3e1523a1cace59159f512336318a510573b47f824edef8860";

View File

@@ -1,7 +1,11 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, EasyProcess
, entrypoint2
, jeepney
, mss
}:
buildPythonPackage rec {
@@ -15,6 +19,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [
EasyProcess
entrypoint2
] ++ lib.optionals (isPy3k) [
jeepney
mss
];
# recursive dependency on pyvirtualdisplay

View File

@@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "python-efl";
version = "1.24.0";
version = "1.25.0";
src = fetchurl {
url = "http://download.enlightenment.org/rel/bindings/python/${pname}-${version}.tar.xz";
sha256 = "1vk1cdd959gia4a9qzyq56a9zw3lqf9ck66k8c9g3c631mp5cfpy";
sha256 = "0bk161xwlz4dlv56r68xwkm8snzfifaxd1j7w2wcyyk4fgvnvq4r";
};
nativeBuildInputs = [ pkgconfig ];

View File

@@ -2,7 +2,7 @@
, buildPythonPackage
, fetchPypi
, setuptools
, vlc
, libvlc
, substituteAll
}:
@@ -22,7 +22,7 @@ buildPythonPackage rec {
patches = [
(substituteAll {
src = ./vlc-paths.patch;
libvlcPath="${vlc}/lib/libvlc.so.5";
libvlcPath="${libvlc}/lib/libvlc.so.5";
})
];

View File

@@ -0,0 +1,31 @@
{ buildPythonPackage, fetchPypi, pytestrunner, pytestCheckHook, glib, vips, cffi
, pkg-config, pkgconfig, lib }:
buildPythonPackage rec {
pname = "pyvips";
version = "2.1.12";
src = fetchPypi {
inherit pname version;
sha256 = "0pg0dxhxgi2m7bb5bi5wpx9hgnbi8ws1bz6w2dldbhi52pizghl4";
};
nativeBuildInputs = [ pytestrunner pkgconfig pkg-config ];
buildInputs = [ glib vips ];
propagatedBuildInputs = [ cffi ];
# tests are not included in pypi tarball
doCheck = false;
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "pyvips" ];
meta = with lib; {
description = "A python wrapper for libvips";
homepage = "https://github.com/libvips/pyvips";
license = licenses.mit;
maintainers = with maintainers; [ ccellado ];
};
}

View File

@@ -0,0 +1,20 @@
{ lib, buildPythonPackage, fetchPypi, python, mohawk, requests }:
buildPythonPackage rec {
pname = "requests-hawk";
version = "1.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "1qcga289yr6qlkmc6fjk0ia6l5cg0galklpdzpslf1y8ky9zb7rl";
};
propagatedBuildInputs = [ mohawk requests ];
meta = with lib; {
description = "Hawk authentication strategy for the requests python library.";
homepage = "https://github.com/sam-washington/requests-hawk";
license = licenses.asl20;
maintainers = with maintainers; [ austinbutler ];
};
}

View File

@@ -25,12 +25,12 @@
buildPythonPackage rec {
pname = "snowflake-connector-python";
version = "2.2.10";
version = "2.3.2";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0beba8eb9c1dec2782d52491d058256e1f5d9e010114a80ff3b8e3905be655fd";
sha256 = "0as7m736wgx684wssnvhvixjkqidnhxn9i98rcdgagr67s3akfdy";
};
propagatedBuildInputs = [
@@ -57,12 +57,15 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.py \
--replace "'cffi>=1.9,<1.14'," "'cffi~=1.9',"
--replace "'cryptography>=2.5.0,<3.0.0'," "'cryptography'," \
--replace "'idna<2.10'," "'idna'," \
--replace "'requests<2.24.0'," "'requests',"
'';
# tests are not working
# XXX: fix the tests
doCheck = false;
pythonImportsCheck = [ "snowflake" "snowflake.connector" ];
meta = with lib; {
description = "Snowflake Connector for Python";

View File

@@ -19,6 +19,8 @@ buildPythonPackage rec {
snowflake-connector-python
];
pythonImportsCheck = [ "snowflake.sqlalchemy" ];
meta = with lib; {
description = "Snowflake SQLAlchemy Dialect";
homepage = "https://www.snowflake.net/";

View File

@@ -72,7 +72,7 @@ let
tfFeature = x: if x then "1" else "0";
version = "1.15.2";
version = "1.15.4";
variant = if cudaSupport then "-gpu" else "";
pname = "tensorflow${variant}";
@@ -103,7 +103,7 @@ let
owner = "tensorflow";
repo = "tensorflow";
rev = "v${version}";
sha256 = "1q0848drjvnaaa38dgns8knmpmkj5plzsc98j20m5ybv68s55w78";
sha256 = "0lg8ahyr2k7dmp0yfypk8ivl9a0xcg3j0f0dakmn5ljk8nsji0bj";
};
patches = [
@@ -255,6 +255,9 @@ let
# include security vulnerabilities. So we make it optional.
# https://github.com/tensorflow/tensorflow/issues/20280#issuecomment-400230560
sed -i '/tensorboard >=/d' tensorflow/tools/pip_package/setup.py
substituteInPlace tensorflow/tools/pip_package/setup.py \
--replace "numpy >= 1.16.0, < 1.19.0" "numpy >= 1.16.0"
'';
preConfigure = let
@@ -307,9 +310,9 @@ let
# cudaSupport causes fetch of ncclArchive, resulting in different hashes
sha256 = if cudaSupport then
"09j57w6kc0vkfcdwr0qggy3qgrgq82kfa2jrwvvcnij4bl3wj40j"
"1bi6aydidgi943hiqj0d279jbz2g173hvafdqla1ifw2qdsm73pb"
else
"14g8z49qz7d8n1c2mcsfhr7yqpcy7mhmpm6hgmqvpgb8vm7yvwrc";
"0l5510fr8n22c4hx9llr0vqqhx9wlgkyxl55fxbixhssd0ai05r4";
};
buildAttrs = {

View File

@@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, fetchPypi
, click
, pytestCheckHook
, shellingham
, pytestcov
, pytest_xdist
, pytest-sugar
, coverage
, mypy
, black
, isort
}:
buildPythonPackage rec {
pname = "typer";
version = "0.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal";
};
propagatedBuildInputs = [ click ];
checkInputs = [
pytestCheckHook
pytestcov
pytest_xdist
pytest-sugar
shellingham
coverage
mypy
black
isort
];
pytestFlagsArray = [
"--ignore=tests/test_completion/test_completion.py"
"--ignore=tests/test_completion/test_completion_install.py"
];
meta = with lib; {
homepage = "https://typer.tiangolo.com/";
description = "Typer, build great CLIs. Easy to code. Based on Python type hints.";
license = licenses.mit;
maintainers = [ maintainers.winpat ];
};
}