Merge pull request #115779 from dotlambda/nixops-unbreak

nixops: unbreak
This commit is contained in:
adisbladis 2021-03-11 14:16:07 +02:00 committed by GitHub
commit 0213d5f933
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 190 additions and 4 deletions

View file

@ -0,0 +1,29 @@
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
, six, pytestCheckHook, pytest-benchmark, enum34, numpy, arrow, ruamel_yaml
}:
buildPythonPackage rec {
pname = "construct";
version = "2.10.54";
# no tests in PyPI tarball
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1mqspsn6bf3ibvih1zna2glkg8iw7vy5zg9gzg0d1m8zcndk2c48";
};
checkInputs = [ pytestCheckHook pytest-benchmark enum34 numpy arrow ruamel_yaml ];
disabledTests = lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
pytestFlagsArray = [ "--benchmark-disable" ];
meta = with lib; {
description = "Powerful declarative parser (and builder) for binary data";
homepage = "https://construct.readthedocs.org/";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pymeeus
, pytz
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "convertdate";
version = "2.2.2";
# Tests are not available in the PyPI tarball so use GitHub instead.
src = fetchFromGitHub {
owner = "fitnr";
repo = pname;
rev = "v${version}";
sha256 = "1xgi7x9b9kxm0q51bqnmwdm5lp8vwhx5yk4d1b23r37spz9dbhw5";
};
propagatedBuildInputs = [
pymeeus
pytz
];
checkInputs = [
pytestCheckHook
];
meta = with lib; {
homepage = "https://github.com/fitnr/convertdate";
description = "Utils for converting between date formats and calculating holidays";
license = licenses.mit;
maintainers = with maintainers; [ jluttine ];
};
}

View file

@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, isPy27
, fetchFromGitHub
, pymeeus
, pytz
@ -10,6 +11,8 @@ buildPythonPackage rec {
pname = "convertdate";
version = "2.3.0";
disabled = isPy27;
# Tests are not available in the PyPI tarball so use GitHub instead.
src = fetchFromGitHub {
owner = "fitnr";

View file

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, mock
, parameterized
, pytestCheckHook
, dateutil
, pytz
, regex
, tzlocal
, convertdate
, umalqurra
, jdatetime
, ruamel_yaml
}:
buildPythonPackage rec {
pname = "dateparser";
version = "0.7.6";
src = fetchFromGitHub {
owner = "scrapinghub";
repo = "dateparser";
rev = "v${version}";
sha256 = "0j3sm4hlx7z0ci5fnjq5n9i02vvlfz0wxa889ydryfknjhy5apqw";
};
checkInputs = [
mock
parameterized
pytestCheckHook
];
pytestFlagsArray = [ "tests" ];
disabledTestPaths = [
"tests/test_dateparser_data_integrity.py" # ImportError: No module named ruamel.yaml
];
propagatedBuildInputs = [
# install_requires
dateutil pytz regex tzlocal
# extra_requires
convertdate umalqurra jdatetime ruamel_yaml
];
pythonImportsCheck = [ "dateparser" ];
meta = with lib; {
description = "Date parsing library designed to parse dates from HTML pages";
homepage = "https://github.com/scrapinghub/dateparser";
license = licenses.bsd3;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -0,0 +1,48 @@
{ buildPythonPackage
, lib
, six
, fetchPypi
, pyyaml
, mock
, contextlib2
, wrapt
, pytest
, pytest-httpbin
, yarl
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "vcrpy";
version = "3.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "21168d5ae14263a833d4b71acfd8278d8841114f24be1b4ab4a5719d0c7f07bc";
};
checkInputs = [
pytest
pytest-httpbin
];
propagatedBuildInputs = [
pyyaml
wrapt
six
]
++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ]
++ lib.optionals (pythonAtLeast "3.4") [ yarl ];
checkPhase = ''
py.test --ignore=tests/integration -k "not TestVCRConnection"
'';
meta = with lib; {
description = "Automatically mock your HTTP interactions to simplify and speed up testing";
homepage = "https://github.com/kevin1024/vcrpy";
license = licenses.mit;
};
}

View file

@ -1,5 +1,6 @@
{ buildPythonPackage
, lib
, isPy27
, six
, fetchPypi
, pyyaml
@ -17,6 +18,8 @@ buildPythonPackage rec {
pname = "vcrpy";
version = "4.1.1";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "57095bf22fc0a2d99ee9674cdafebed0f3ba763018582450706f7d3a74fff599";

View file

@ -1462,7 +1462,10 @@ in {
constantly = callPackage ../development/python-modules/constantly { };
construct = callPackage ../development/python-modules/construct { };
construct = if isPy27 then
callPackage ../development/python-modules/construct/2.10.54.nix { }
else
callPackage ../development/python-modules/construct { };
consul = callPackage ../development/python-modules/consul { };
@ -1472,7 +1475,10 @@ in {
contextvars = callPackage ../development/python-modules/contextvars { };
convertdate = callPackage ../development/python-modules/convertdate { };
convertdate = if isPy27 then
callPackage ../development/python-modules/convertdate/2.2.x.nix { }
else
callPackage ../development/python-modules/convertdate { };
cookiecutter = callPackage ../development/python-modules/cookiecutter { };
@ -1666,7 +1672,10 @@ in {
inherit (pkgs.llvmPackages) libcxx;
};
dateparser = callPackage ../development/python-modules/dateparser { };
dateparser = if isPy27 then
callPackage ../development/python-modules/dateparser/0.x.nix { }
else
callPackage ../development/python-modules/dateparser { };
datrie = callPackage ../development/python-modules/datrie { };
@ -8357,7 +8366,10 @@ in {
varint = callPackage ../development/python-modules/varint { };
vcrpy = callPackage ../development/python-modules/vcrpy { };
vcrpy = if isPy27 then
callPackage ../development/python-modules/vcrpy/3.nix { }
else
callPackage ../development/python-modules/vcrpy { };
vcver = callPackage ../development/python-modules/vcver { };