Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
John Ericson
2020-04-17 18:40:51 -04:00
201 changed files with 10159 additions and 5361 deletions

View File

@@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
@@ -37,13 +38,16 @@ buildPythonPackage rec {
# Cirq 0.6 requires networkx==2.3 only for optional qiskit dependency/test, disable this to avoid networkx version conflicts. https://github.com/quantumlib/Cirq/issues/2368
# Cirq locks protobuf==3.8.0, but tested working with default pythonPackages.protobuf (3.7). This avoids overrides/pythonPackages.protobuf conflicts
prePatch = ''
postPatch = ''
substituteInPlace requirements.txt --replace "networkx==2.3" "networkx" \
--replace "protobuf==3.8.0" "protobuf"
# Fix sympy 1.5 test failures. Should be fixed in v0.7
substituteInPlace cirq/optimizers/eject_phased_paulis_test.py --replace "phase_exponent=0.125 + x / 8" "phase_exponent=0.125 + x * 0.125"
substituteInPlace cirq/contrib/quirk/cells/parse_test.py --replace "parse_formula('5t') == 5 * t" "parse_formula('5t') == 5.0 * t"
# Fix pandas >= 1.0 error, #2886
substituteInPlace cirq/experiments/t1_decay_experiment.py --replace "del tab.columns.name" 'tab.rename_axis(None, axis="columns", inplace=True)'
'';
propagatedBuildInputs = [
@@ -76,6 +80,13 @@ buildPythonPackage rec {
"--ignore=dev_tools" # Only needed when developing new code, which is out-of-scope
"--ignore=cirq/google/op_serializer_test.py" # investigating in https://github.com/quantumlib/Cirq/issues/2727
];
disabledTests = [
"test_convert_to_ion_gates" # fails due to rounding error, 0.75 != 0.750...2
] ++ lib.optionals stdenv.isAarch64 [
# Seem to fail due to math issues on aarch64?
"expectation_from_wavefunction"
"test_single_qubit_op_to_framed_phase_form_output_on_example_case"
];
meta = with lib; {
description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.";

View File

@@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "configshell";
version = "1.1.27";
version = "1.1.28";
src = fetchFromGitHub {
owner = "open-iscsi";
repo ="${pname}-fb";
repo = "${pname}-fb";
rev = "v${version}";
sha256 = "1nldzq3097xqgzd8qxv36ydvx6vj2crwanihz53k46is0myrwcnn";
sha256 = "1ym2hkvmmacgy21wnjwzyrcxyl3sx4bcx4hc51vf4lzcnj589l68";
};
propagatedBuildInputs = [ pyparsing six urwid ];

View File

@@ -4,7 +4,7 @@
, fetchPypi
, isPyPy
, python
, openblasCompat # build segfaults with regular openblas
, blas, lapack # build segfaults with 64-bit blas
, suitesparse
, glpk ? null
, gsl ? null
@@ -14,6 +14,8 @@
, withFftw ? true
}:
assert (!blas.is64bit) && (!lapack.is64bit);
buildPythonPackage rec {
pname = "cvxopt";
version = "1.2.4";
@@ -25,12 +27,13 @@ buildPythonPackage rec {
sha256 = "1h9g79gxpgpy6xciqyypihw5q4ngp322lpkka1nkwk0ysybfsp7s";
};
buildInputs = [ blas lapack ];
# similar to Gsl, glpk, fftw there is also a dsdp interface
# but dsdp is not yet packaged in nixpkgs
preConfigure = ''
export CVXOPT_BLAS_LIB_DIR=${openblasCompat}/lib
export CVXOPT_BLAS_LIB=openblas
export CVXOPT_LAPACK_LIB=openblas
export CVXOPT_BLAS_LIB=blas
export CVXOPT_LAPACK_LIB=lapack
export CVXOPT_SUITESPARSE_LIB_DIR=${lib.getLib suitesparse}/lib
export CVXOPT_SUITESPARSE_INC_DIR=${lib.getDev suitesparse}/include
'' + lib.optionalString withGsl ''

View File

@@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "dkimpy";
version = "1.0.2";
version = "1.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "19rz48pzz1i5cc896khaqx2hkhcj5hwsklnyynrdgdr5818qjyff";
sha256 = "14idcs0wiyc0iyi5bz3xqimxf3x6dizcjfn92s2ka5zxp95xdyvd";
};
checkInputs = [ pytest ];

View File

@@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "FoxDot";
version = "0.8.5";
version = "0.8.7";
src = fetchPypi {
inherit pname version;
sha256 = "1k32fjlmzhhh6hvda71xqis13c3bdn7y3f5z9qqd1q410nfpzf59";
sha256 = "0c5iqdn17ip6lkf26xb1cwjvcly0448gvqmkbkvhnqy4birc8cf5";
};
propagatedBuildInputs = [ tkinter supercollider ];

View File

@@ -5,21 +5,23 @@
, gfortran
, pytest
, blas
, lapack
, writeTextFile
, isPyPy
, cython
, setuptoolsBuildHook
}:
assert (!blas.is64bit) && (!lapack.is64bit);
let
blasImplementation = lib.nameFromURL blas.name "-";
cfg = writeTextFile {
name = "site.cfg";
text = (lib.generators.toINI {} {
${blasImplementation} = {
include_dirs = "${blas}/include";
library_dirs = "${blas}/lib";
} // lib.optionalAttrs (blasImplementation == "mkl") {
${blas.implementation} = {
include_dirs = "${blas}/include:${lapack}/include";
library_dirs = "${blas}/lib:${lapack}/lib";
} // lib.optionalAttrs (blas.implementation == "mkl") {
mkl_libs = "mkl_rt";
lapack_libs = "";
};
@@ -37,7 +39,7 @@ in buildPythonPackage rec {
};
nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ];
buildInputs = [ blas ];
buildInputs = [ blas lapack ];
patches = lib.optionals python.hasDistutilsCxxPatch [
# We patch cpython/distutils to fix https://bugs.python.org/issue1222585
@@ -68,8 +70,10 @@ in buildPythonPackage rec {
'';
passthru = {
blas = blas;
inherit blasImplementation cfg;
# just for backwards compatibility
blas = blas.provider;
blasImplementation = blas.implementation;
inherit cfg;
};
# Disable test

View File

@@ -0,0 +1,23 @@
{ stdenv, buildPythonPackage, fetchPypi, pdfrw }:
buildPythonPackage rec {
pname = "pagelabels";
version = "1.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "07as5kzyvj66bfgvx8bph8gkyj6cgm4lhgxwb78bpdl4m8y8kpma";
};
buildInputs = [ pdfrw ];
# upstream doesn't contain tests
doCheck = false;
meta = with stdenv.lib; {
description = "Python library to manipulate PDF page labels.";
homepage = "https://github.com/lovasoa/pagelabels-py";
maintainers = with maintainers; [ teto ];
license = licenses.gpl3;
};
}

View File

@@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "pdfrw";
version = "0.4";
src = fetchPypi {
inherit pname version;
sha256 = "1x1yp63lg3jxpg9igw8lh5rc51q353ifsa1bailb4qb51r54kh0d";
};
# tests require the extra download of github.com/pmaupin/static_pdfs
doCheck = false;
meta = with stdenv.lib; {
description = "pdfrw is a pure Python library that reads and writes PDFs.";
homepage = "https://github.com/pmaupin/pdfrw";
maintainers = with maintainers; [ teto ];
license = licenses.mit;
};
}

View File

@@ -1,13 +1,11 @@
{ lib
, blas
, lapack
, buildPythonPackage
, cffi
, fetchFromGitHub
, liblapack
, nose
, numpy
, openblas
, useOpenblas ? true
}:
buildPythonPackage {
@@ -21,8 +19,6 @@ buildPythonPackage {
sha256 = "0mlrjbb5rw78dgijkr3bspmsskk6jqs9y7xpsgs35i46dvb327q5";
};
patches = lib.optional useOpenblas ./use-openblas.patch;
checkInputs = [
nose
];
@@ -32,12 +28,7 @@ buildPythonPackage {
cffi
];
buildInputs = (
if useOpenblas then
[ openblas ]
else
[ blas liblapack ]
);
buildInputs = [ blas lapack ];
enableParallelBuilding = true;

View File

@@ -1,11 +0,0 @@
index f100b35..448bbaf 100644
--- a/prox_tv/prox_tv_build.py
+++ b/prox_tv/prox_tv_build.py
@@ -109,6 +109,6 @@ ffi.set_source(
define_macros=[('NOMATLAB', 1)],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
- libraries=['blas', 'lapack'],
+ libraries=['openblas'],
include_dirs=['/usr/include']
)

View File

@@ -3,7 +3,8 @@
, fetchFromGitHub
, numpy
, setuptools
, liblapack
, blas
, lapack
, isPy27
, python
}:
@@ -24,8 +25,8 @@ buildPythonPackage {
propagatedBuildInputs = [
numpy
numpy.blas
liblapack
blas
lapack
];
# Include patches from working version of PySparse 1.3-dev in

View File

@@ -1,6 +1,6 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
, pytest, mock, pytestcov, coverage
, future, futures, ujson
, future, futures, ujson, isPy38
}:
buildPythonPackage rec {
@@ -26,6 +26,8 @@ buildPythonPackage rec {
pytest
'';
disabled = isPy38;
propagatedBuildInputs = [ future ujson ]
++ stdenv.lib.optional (pythonOlder "3.2") futures;

View File

@@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "rtslib";
version = "2.1.71";
version = "2.1.72";
src = fetchFromGitHub {
owner = "open-iscsi";
repo ="${pname}-fb";
repo = "${pname}-fb";
rev = "v${version}";
sha256 = "0cn9azi44hf59mp47207igv72kjbkyz4rsvgzmwbpz0s57b0hnab";
sha256 = "13kycf9xkyxm1ik8yh3qpd96vird8y65daigyiyb4jvx0lmrd0kv";
};
propagatedBuildInputs = [ six pyudev pygobject3 ];

View File

@@ -2,7 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, blas
, liblapack
, lapack
, numpy
, scipy
, scs
@@ -26,7 +26,7 @@ buildPythonPackage rec {
'';
buildInputs = [
liblapack
lapack
blas
];

View File

@@ -0,0 +1,38 @@
{ lib
, isPy3k
, fetchFromGitHub
, buildPythonPackage
, flake8-import-order
, pyflakes
, mock
}:
buildPythonPackage rec {
pname = "zimports";
version = "0.2.0";
src = fetchFromGitHub {
owner = "sqlalchemyorg";
repo = "zimports";
rev = version;
sha256 = "0a5axflkk0wv0rdnrh8l2rgj8gh2pfkg5lrvr8x4yxxiifawrafc";
};
disabled = !isPy3k;
propagatedBuildInputs = [
pyflakes
flake8-import-order
];
checkInputs = [
mock
];
meta = with lib; {
description = "Python import rewriter";
homepage = "https://github.com/sqlalchemyorg/zimports";
license = licenses.mit;
maintainers = with maintainers; [ timokau ];
};
}