Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2020-11-16 09:01:53 +01:00
169 changed files with 2938 additions and 1614 deletions

View File

@@ -10,12 +10,12 @@
buildPythonPackage rec {
pname = "azure-mgmt-policyinsights";
version = "0.5.0";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "ed229e3845c477e88dde413825d4fba0d38b3a5ffab4e694c7d0da995f3db0f3";
sha256 = "2c64533f6eab08dc16450fc5d7c7651557fc0edc8ef1278dda336333d648a7c4";
};
propagatedBuildInputs = [

View File

@@ -12,11 +12,11 @@
buildPythonPackage rec {
pname = "bpython";
version = "0.20";
version = "0.20.1";
src = fetchPypi {
inherit pname version;
sha256 = "fec7d97be9912a50d8f5b34ca10d70715c99a33f0cd0b9e4977c1b0f617fa913";
sha256 = "6e7738806013b469be57b0117082b9c4557ed7c92c70ceb79f96d674d89c7503";
};
patches = [ (substituteAll {

View File

@@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "casbin";
version = "0.9.0";
version = "0.10.0";
disabled = isPy27;
@@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = pname;
repo = "pycasbin";
rev = "v${version}";
sha256 = "16bqa2f5l2cns2izc4siy8jw23q9vrqm9wnyp696fj83y77nkp75";
sha256 = "13r8alja25yd5gk5124y1v6frwphmz6wl5z5gz1fafb5nv2zgqw9";
};
propagatedBuildInputs = [

View File

@@ -6,11 +6,11 @@
}:
buildPythonPackage rec {
pname = "cmd2";
version = "1.3.11";
version = "1.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "826a288ee6d9c4ec1184e64e9566c09d3b73be8f4283c1898fa4332f1daf8dbf";
sha256 = "e59fa932418603af4e046a96c8985812b05af8a73bfd9d7a386cd1b02c6ab687";
};
LC_ALL="en_US.UTF-8";

View File

@@ -3,6 +3,7 @@
, fetchFromGitHub
, dill
, filelock
, multiprocess
, numpy
, pandas
, pyarrow
@@ -13,18 +14,19 @@
buildPythonPackage rec {
pname = "datasets";
version = "1.0.1";
version = "1.1.2";
src = fetchFromGitHub {
owner = "huggingface";
repo = pname;
rev = version;
sha256 = "14f7847b8md5kf631zl8x2f53wy8zbzxypq4wdgzvwsjz4k7v4jn";
hash = "sha256-upXZ2rOfmjnJbDo6RMGeHv/fe10RQAf/zwDWWKdt6SA=";
};
propagatedBuildInputs = [
dill
filelock
multiprocess
numpy
pandas
pyarrow

View File

@@ -9,11 +9,12 @@
, scipy
, h5py
, nibabel
, tqdm
}:
buildPythonPackage rec {
pname = "dipy";
version = "1.2.0";
version = "1.3.0";
disabled = isPy27;
@@ -21,7 +22,7 @@ buildPythonPackage rec {
owner = "dipy";
repo = pname;
rev = version;
sha256 = "0x49lph400ndlvk419nd2g9ss4jg75xr7xh88ggv5d2ama19v7py";
sha256 = "0555abx0fwqmk6dc3im7r45d9j7r9xh6gm9mbwfwvlf7laf8h098";
};
nativeBuildInputs = [ cython packaging ];
@@ -30,6 +31,7 @@ buildPythonPackage rec {
scipy
h5py
nibabel
tqdm
];
checkInputs = [ pytest ];

View File

@@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "dropbox";
version = "10.8.0";
version = "10.10.0";
src = fetchPypi {
inherit pname version;
sha256 = "2312a0314d7698f6aa6944bf6d73a756f4ff7d7d90fa26c323a418a84dc3b533";
sha256 = "df43e9e0bdcae6d610dd754a5ec72f2f91a311bbc2c8a28d076df69695b18398";
};
# Set DROPBOX_TOKEN environment variable to a valid token.

View File

@@ -15,13 +15,13 @@
buildPythonPackage rec {
pname = "gtts";
version = "2.1.1";
version = "2.1.2";
src = fetchFromGitHub {
owner = "pndurette";
repo = "gTTS";
rev = "v${version}";
sha256 = "1d0r6dnb8xvgyvxz7nfj4q4xqmpmvcwcsjghxrh76m6p364lh1hj";
sha256 = "1vcsxzqzl61h50lm934hd7q5nl7l10wwymgq1mcynmqxbm1s4rnl";
};
propagatedBuildInputs = [

View File

@@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "hyperopt";
version = "0.1.2";
version = "0.2.5";
src = fetchPypi {
inherit pname version;
sha256 = "34xIpivBYUvcN/XMVwBkqTpLgaFlWWIduazuP2U2tlg=";
sha256 = "bc6047d50f956ae64eebcb34b1fd40f186a93e214957f20e87af2f10195295cc";
};
propagatedBuildInputs = [ future cloudpickle numpy networkx six tqdm scipy pymongo ];

View File

@@ -19,11 +19,11 @@
buildPythonPackage rec {
pname = "internetarchive";
version = "1.9.5";
version = "1.9.6";
src = fetchPypi {
inherit pname version;
sha256 = "759053685c75e6e969d690043b82643c4016500abcbbc44e4daf52ec097a9a15";
sha256 = "0e9b24577086283280a5089b3e65086640b4e42d61ca4af913639f45b02b9e4c";
};
propagatedBuildInputs = [

View File

@@ -0,0 +1,22 @@
{ stdenv
, buildPythonPackage
, notmuch
, python
, cffi
}:
buildPythonPackage {
pname = "notmuch2";
inherit (notmuch) version src;
sourceRoot = "${notmuch.src.name}/bindings/python-cffi";
buildInputs = [ python notmuch cffi ];
meta = with stdenv.lib; {
description = "Pythonic bindings for the notmuch mail database using CFFI";
homepage = "https://notmuchmail.org/";
license = licenses.gpl3;
maintainers = with maintainers; [ teto ];
};
}

View File

@@ -0,0 +1,29 @@
diff --git a/phonemizer/backend/espeak.py b/phonemizer/backend/espeak.py
index 387c11c..ceb5e7e 100644
--- a/phonemizer/backend/espeak.py
+++ b/phonemizer/backend/espeak.py
@@ -81,10 +81,7 @@ class BaseEspeakBackend(BaseBackend):
if _ESPEAK_DEFAULT_PATH:
return _ESPEAK_DEFAULT_PATH
- espeak = distutils.spawn.find_executable('espeak-ng')
- if not espeak: # pragma: nocover
- espeak = distutils.spawn.find_executable('espeak')
- return espeak
+ return "@espeak@"
@classmethod
def is_available(cls):
diff --git a/phonemizer/backend/festival.py b/phonemizer/backend/festival.py
index b5bc56d..0833160 100644
--- a/phonemizer/backend/festival.py
+++ b/phonemizer/backend/festival.py
@@ -78,7 +78,7 @@ class FestivalBackend(BaseBackend):
if _FESTIVAL_DEFAULT_PATH:
return _FESTIVAL_DEFAULT_PATH
- return distutils.spawn.find_executable('festival')
+ return "@festival@"
@classmethod
def is_available(cls):

View File

@@ -0,0 +1,73 @@
{ lib
, substituteAll
, buildPythonApplication
, fetchPypi
, python3Packages
, pkgs
, joblib
, segments
, attrs
, espeak-ng
, pytestCheckHook
, pytestrunner
, pytestcov
}:
buildPythonApplication rec {
pname = "phonemizer";
version = "2.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "127n4f10zxq60qd8xvlc1amji4wbghqb90rfp25rzdk716kvgwab";
};
postPatch = ''
sed -i -e '/\'pytest-runner\'/d setup.py
'';
patches = [
(substituteAll {
src = ./backend-paths.patch;
espeak = "${lib.getBin espeak-ng}/bin/espeak";
# override festival path should you try to integrate it
festival = "";
})
./remove-intertwined-festival-test.patch
];
propagatedBuildInputs = [
joblib
segments
attrs
];
preCheck = ''
export HOME=$TMPDIR
'';
checkInputs = [
pytestCheckHook
pytestcov
];
# We tried to package festvial, but were unable to get the backend running,
# so let's disable related tests.
pytestFlagsArray = [
"--ignore=test/test_festival.py"
];
disabledTests = [
"test_festival"
"test_relative"
"test_absolute"
"test_readme_festival_syll"
];
meta = with lib; {
homepage = "https://github.com/bootphon/phonemizer";
description = "Simple text to phones converter for multiple languages";
license = licenses.gpl3;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/test/test_main.py b/test/test_main.py
index 71d605a..d137cd7 100644
--- a/test/test_main.py
+++ b/test/test_main.py
@@ -63,7 +63,6 @@ def test_readme():
_test(u'hello world', u'həloʊ wɜːld ')
_test(u'hello world', u'həloʊ wɜːld ', '--verbose')
_test(u'hello world', u'həloʊ wɜːld ', '--quiet')
- _test(u'hello world', u'hhaxlow werld', '-b festival --strip')
_test(u'hello world', u'həloʊ wɜːld ', '-l en-us')
_test(u'bonjour le monde', u'bɔ̃ʒuʁ lə mɔ̃d ', '-l fr-fr')
_test(u'bonjour le monde', u'b ɔ̃ ʒ u ʁ ;eword l ə ;eword m ɔ̃ d ;eword ',

View File

@@ -0,0 +1,22 @@
diff --git a/test/test_main.py b/test/test_main.py
index 71d605a..0ea3c74 100644
--- a/test/test_main.py
+++ b/test/test_main.py
@@ -63,17 +63,12 @@ def test_readme():
_test(u'hello world', u'həloʊ wɜːld ')
_test(u'hello world', u'həloʊ wɜːld ', '--verbose')
_test(u'hello world', u'həloʊ wɜːld ', '--quiet')
- _test(u'hello world', u'hhaxlow werld', '-b festival --strip')
_test(u'hello world', u'həloʊ wɜːld ', '-l en-us')
_test(u'bonjour le monde', u'bɔ̃ʒuʁ lə mɔ̃d ', '-l fr-fr')
_test(u'bonjour le monde', u'b ɔ̃ ʒ u ʁ ;eword l ə ;eword m ɔ̃ d ;eword ',
'-l fr-fr -p " " -w ";eword "')
-@pytest.mark.skipif(
- '2.1' in backend.FestivalBackend.version(),
- reason='festival-2.1 gives different results than further versions '
- 'for syllable boundaries')
def test_readme_festival_syll():
_test(u'hello world',
u'hh ax ;esyll l ow ;esyll ;eword w er l d ;esyll ;eword ',

View File

@@ -16,7 +16,7 @@ buildPythonPackage rec {
};
postPatch = ''
sed -i 's/version=versioneer.get_version(),/version="${version}",/g' setup.py
sed -i "s/version=versioneer.get_version(),/version=\"$version\",/g" setup.py
# https://github.com/palantir/python-jsonrpc-server/issues/36
sed -iEe "s!'ujson.*\$!'ujson',!" setup.py
'';

View File

@@ -4,6 +4,7 @@
, isPy27
, numpy
, scikitlearn
, pytestCheckHook
, pytorch
, torchvision
, tqdm
@@ -11,15 +12,15 @@
buildPythonPackage rec {
pname = "pytorch-metric-learning";
version = "0.9.81";
version = "0.9.94";
disabled = isPy27;
src = fetchFromGitHub {
owner = "KevinMusgrave";
repo = pname;
rev = "cb23328aba64f7f4658374cc2920ef5d56cda5c8"; # no version tag
sha256 = "0c2dyi4qi7clln43481xq66f6r4fadrz84jphjc5phz97bp33ds8";
rev = "v${version}";
sha256 = "1i2m651isa6xk3zj8dhzdbmd1bdzl51bh6rxifx6gg22hfa5dj9a";
};
propagatedBuildInputs = [
@@ -30,6 +31,22 @@ buildPythonPackage rec {
tqdm
];
preCheck = ''
export HOME=$TMP
export TEST_DEVICE=cpu
export TEST_DTYPES=float32,float64 # half-precision tests fail on CPU
'';
# package only requires `unittest`, but use `pytest` to exclude tests
checkInputs = [ pytestCheckHook ];
disabledTests = [
# requires FAISS (not in Nixpkgs)
"test_accuracy_calculator_and_faiss"
# require network access:
"test_get_nearest_neighbors"
"test_tuplestoweights_sampler"
"test_untrained_indexer"
];
meta = {
description = "Metric learning library for PyTorch";
homepage = "https://github.com/KevinMusgrave/pytorch-metric-learning";

View File

@@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "pyvips";
version = "2.1.12";
version = "2.1.13";
src = fetchPypi {
inherit pname version;
sha256 = "0pg0dxhxgi2m7bb5bi5wpx9hgnbi8ws1bz6w2dldbhi52pizghl4";
sha256 = "4f1f6fa19893048bf6b950eb7eb2d4cdfeb8b940a9defaca5d4f79e5acd5085f";
};
nativeBuildInputs = [ pytestrunner pkgconfig pkg-config ];

View File

@@ -2,7 +2,7 @@
buildPythonPackage rec {
pname = "sphinxcontrib-katex";
version = "0.6.1";
version = "0.7.1";
# pkgutil namespaces are broken in nixpkgs (because they can't scan multiple
# directories). But python2 is EOL, so not supporting it should be ok.
@@ -10,7 +10,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "88320b2780f350d67f84a5424973ce24aee65701e8e163a7f5856c5df3353188";
sha256 = "fa80aba8af9d78f70a0a255815d44e33e8aca8e806ca6101e0eb18b2b7243246";
};
propagatedBuildInputs = [ sphinx ];

View File

@@ -1,14 +1,14 @@
{ stdenv, buildPythonPackage, fetchPypi }:
{ stdenv, buildPythonPackage, fetchPypi, isPy27 }:
buildPythonPackage rec {
pname = "versioneer";
version = "0.18";
version = "0.19";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0dgkzg1r7mjg91xp81sv9z4mabyxl39pkd11jlc1200md20zglga";
sha256 = "a4fed39bbebcbd2d07f8a86084773f303cb442709491955a0e6754858e47afae";
};
# Couldn't get tests to work because, for instance, they used virtualenv and

View File

@@ -15,11 +15,11 @@
buildPythonPackage rec {
pname = "vowpalwabbit";
version = "8.8.1";
version = "8.9.0";
src = fetchPypi{
inherit pname version;
sha256 = "17fw1g4ka9jppd41srw39zbp2b8h81izc71bbggxgf2r0xbdpga6";
sha256 = "37fb7a400f3a7923a04df9921b3eef1bbe96117424ef083dcfed0e4eea77fa08";
};
nativeBuildInputs = [

View File

@@ -10,7 +10,6 @@
, flake8
, jq
, pytest
, unixtools
, toml
}:
@@ -23,6 +22,10 @@ buildPythonPackage rec {
sha256 = "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl";
};
postPatch = ''
substituteInPlace test/test.py --replace "expect_exit_codes={0} if sys.stdin.isatty() else {2}" "expect_exit_codes={0}"
'';
propagatedBuildInputs = [
pyyaml
xmltodict
@@ -32,7 +35,6 @@ buildPythonPackage rec {
doCheck = true;
checkInputs = [
unixtools.script
pytest
coverage
flake8
@@ -40,8 +42,7 @@ buildPythonPackage rec {
toml
];
# tests fails if stdin is not a tty
checkPhase = "echo | script -c 'pytest ./test/test.py'";
checkPhase = "pytest ./test/test.py";
pythonImportsCheck = [ "yq" ];