Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2019-12-19 09:19:50 +01:00
108 changed files with 1977 additions and 555 deletions

View File

@@ -1,26 +1,34 @@
{ buildPythonPackage
, fetchPypi
{ lib, buildPythonPackage, fetchPypi
, nose
, pytest
, numpy
, pytest
, python
}:
buildPythonPackage rec {
pname = "Bottleneck";
version = "1.2.1";
version = "1.3.1";
src = fetchPypi {
inherit pname version;
sha256 = "6efcde5f830aed64feafca0359b51db0e184c72af8ba6675b4a99f263922eb36";
sha256 = "0a2a94zahl3kqld2n9dm58fvazz9s52sa16nd8yn5jv20hvqc5a5";
};
checkInputs = [ pytest nose ];
propagatedBuildInputs = [ numpy ];
checkPhase = ''
py.test -p no:warnings $out/${python.sitePackages}
'';
postPatch = ''
substituteInPlace setup.py --replace "__builtins__.__NUMPY_SETUP__ = False" ""
'';
checkInputs = [ pytest nose ];
checkPhase = ''
py.test -p no:warnings $out/${python.sitePackages}
'';
meta = with lib; {
description = "Fast NumPy array functions written in C";
homepage = "https://github.com/pydata/bottleneck";
license = licenses.bsd2;
maintainers = with maintainers; [ ];
};
}

View File

@@ -15,13 +15,13 @@
buildPythonPackage rec {
pname = "dask";
version = "2.6.0";
version = "2.9.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "81c7891f0d2e7ac03d1f7fabf1f639360a1db52c03a7155ba9b08e9ee6280f2b";
sha256 = "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b";
};
checkInputs = [ pytest ];

View File

@@ -6,6 +6,7 @@
buildPythonPackage rec {
pname = "ics";
version = "0.6";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "C4ptainCrunch";
@@ -15,9 +16,16 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [ tatsu arrow ];
checkInputs = [ pytest-sugar pytestpep8 pytest-flakes pytestcov ];
disabled = pythonOlder "3.6";
postPatch = ''
substituteInPlace requirements.txt \
--replace "arrow>=0.11,<0.15" "arrow"
'';
checkInputs = [ pytest-sugar pytestpep8 pytest-flakes pytestcov ];
checkPhase = ''
pytest
'';
meta = with stdenv.lib; {
description = "Pythonic and easy iCalendar library (RFC 5545)";

View File

@@ -1,15 +1,31 @@
{ buildPythonPackage, fetchPypi, setuptools_scm
{ lib, buildPythonPackage, fetchPypi, pythonOlder
, importlib-resources
, jaraco_functools
, setuptools_scm
}:
buildPythonPackage rec {
pname = "jaraco.text";
version = "3.1";
version = "3.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "0c7effed0f269e8bdae3374a7545763e84c1e7f9777cf2dd2d49eef92eb0d7b7";
sha256 = "1v0hz3h74m31jlbc5bxwkvrx1h2n7887bajrg1n1c3yc4q8qn1z5";
};
nativeBuildInputs =[ setuptools_scm ];
propagatedBuildInputs = [
jaraco_functools
] ++ lib.optional (pythonOlder "3.7") [ importlib-resources ];
# no tests in pypi package
doCheck = false;
buildInputs =[ setuptools_scm ];
propagatedBuildInputs = [ jaraco_functools ];
meta = with lib; {
description = "Module for text manipulation";
homepage = "https://github.com/jaraco/jaraco.text";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View File

@@ -5,19 +5,26 @@
buildPythonPackage rec {
pname = "mypy";
version = "0.740";
version = "0.750";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0k0l74g3jcq7ppzn234sffsaacn6qaq242famckk0cviwgld1jvf";
};
propagatedBuildInputs = [ typed-ast psutil mypy-extensions typing-extensions ];
# Tests not included in pip package.
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "48c8bc99380575deb39f5d3400ebb6a8a1cb5cc669bbba4d3bb30f904e0a0e7d";
};
disabled = !isPy3k;
propagatedBuildInputs = [ typed-ast psutil mypy-extensions typing-extensions ];
pythonImportsCheck = [
"mypy"
"mypy.types"
"mypy.api"
"mypy.fastparse"
"mypy.report"
];
meta = with stdenv.lib; {
description = "Optional static typing for Python";

View File

@@ -0,0 +1,37 @@
{ buildPythonPackage
, stdenv
, fetchFromGitHub
, click
, six
, tqdm
, joblib
, pytest
}:
buildPythonPackage rec {
pname = "sacremoses";
version = "0.0.35";
src = fetchFromGitHub {
owner = "alvations";
repo = pname;
rev = "${version}";
sha256 = "1gzr56w8yx82mn08wax5m0xyg15ym4ri5l80gmagp8r53443j770";
};
propagatedBuildInputs = [ click six tqdm joblib ];
checkInputs = [ pytest ];
# ignore tests which call to remote host
checkPhase = ''
pytest -k 'not truecase'
'';
meta = with stdenv.lib; {
homepage = "https://github.com/alvations/sacremoses";
description = "Python port of Moses tokenizer, truecaser and normalizer";
license = licenses.lgpl21Plus;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ pashashocky ];
};
}

View File

@@ -0,0 +1,15 @@
{ buildPythonPackage
, stdenv
, sentencepiece
, pkgconfig
}:
buildPythonPackage rec {
pname = "sentencepiece";
inherit (sentencepiece) version src meta;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ sentencepiece ];
sourceRoot = "source/python";
}

View File

@@ -0,0 +1,41 @@
{ buildPythonPackage
, stdenv
, fetchFromGitHub
, sacremoses
, requests
, sentencepiece
, boto3
, tqdm
, regex
, numpy
, pytest
}:
buildPythonPackage rec {
pname = "transformers";
version = "2.2.1";
src = fetchFromGitHub {
owner = "huggingface";
repo = pname;
rev = "v${version}";
sha256 = "1p8p3lhhiyk1xl9gpgq4vbchyz57v3w7hhvsj1r90zs3cckindl8";
};
propagatedBuildInputs = [ numpy sacremoses requests sentencepiece boto3 tqdm regex ];
checkInputs = [ pytest ];
# pretrained tries to download from s3
checkPhase = ''
cd transformers # avoid importing local files
HOME=$TMPDIR pytest -k 'not pretrained_tokenizers'
'';
meta = with stdenv.lib; {
homepage = "https://github.com/huggingface/transformers";
description = "State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch";
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ pashashocky ];
};
}