diff --git a/pkgs/development/python-modules/Nikola/default.nix b/pkgs/development/python-modules/Nikola/default.nix index 55c6c6ec95f..06bcde602a7 100644 --- a/pkgs/development/python-modules/Nikola/default.nix +++ b/pkgs/development/python-modules/Nikola/default.nix @@ -19,7 +19,6 @@ , PyRSS2Gen , Logbook , blinker -, setuptools , natsort , requests , piexif @@ -28,7 +27,6 @@ , jinja2 , Babel , freezegun -, pyyaml , toml , notebook , ruamel_yaml @@ -46,9 +44,11 @@ buildPythonPackage rec { checkInputs = [ pytest pytestcov mock glibcLocales freezegun ]; propagatedBuildInputs = [ - pygments pillow dateutil docutils Mako unidecode lxml Yapsy PyRSS2Gen - Logbook blinker setuptools natsort requests piexif markdown phpserialize - jinja2 doit Babel pyyaml toml notebook ruamel_yaml + # requirements.txt + doit pygments pillow dateutil docutils Mako markdown unidecode + lxml Yapsy PyRSS2Gen Logbook blinker natsort requests piexif Babel + # requirements-extras.txt + phpserialize jinja2 toml notebook ruamel_yaml ]; src = fetchPypi { diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix index 3e07188986d..a6c3f485d74 100644 --- a/pkgs/development/python-modules/canmatrix/default.nix +++ b/pkgs/development/python-modules/canmatrix/default.nix @@ -1,39 +1,53 @@ { lib , buildPythonPackage , fetchFromGitHub -, python +, pythonOlder +, attrs +, bitstruct +, future +, pathlib2 +, typing , lxml , xlwt , xlrd , XlsxWriter , pyyaml -, future }: +, pytest +}: buildPythonPackage rec { pname = "canmatrix"; - version = "0.6"; + version = "0.7"; # uses fetchFromGitHub as PyPi release misses test/ dir src = fetchFromGitHub { owner = "ebroecker"; repo = pname; rev = version; - sha256 = "1lb0krhchja2jqfsh5lsfgmqcchs1pd38akvc407jfmll96f4yqz"; + sha256 = "0q8qb282nfgirl8r2i9c8whm3hvr14ig2r42ssgnv2hya971cwjq"; }; - checkPhase = '' - cd test - ${python.interpreter} ./test.py - ''; + propagatedBuildInputs = [ + # required + attrs + bitstruct + future + pathlib2 + # optional + lxml + xlwt + xlrd + XlsxWriter + pyyaml + ] ++ lib.optional (pythonOlder "3.5") typing; - propagatedBuildInputs = - [ lxml - xlwt - xlrd - XlsxWriter - pyyaml - future - ]; + checkInputs = [ + pytest + ]; + + checkPhase = '' + pytest -s src/canmatrix + ''; meta = with lib; { homepage = https://github.com/ebroecker/canmatrix; diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index 4434ea0edc1..2646ee1b936 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -21,12 +21,12 @@ buildPythonPackage rec { pname = "intake"; - version = "0.4.1"; + version = "0.4.4"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "f47e53aa764eeadf6adcc667b9817b1ad32496477476da0b982d4fc0744b40ef"; + sha256 = "3fc1b7c2949c9b4200ecbbfdff17da126981a1d8d95ccb7b7bcca3e3dd849d5e"; }; checkInputs = [ pytest ]; @@ -47,8 +47,9 @@ buildPythonPackage rec { ]; checkPhase = '' - # single test assumes python for executable name - PATH=$out/bin:$PATH HOME=$(mktemp -d) pytest --ignore=intake/catalog/tests/test_default.py + # test_filtered_compressed_cache requires calvert_uk_filter.tar.gz, which is not included in tarball + # test_which assumes python for executable name + PATH=$out/bin:$PATH HOME=$(mktemp -d) pytest -k "not test_filtered_compressed_cache and not test_which" ''; meta = with lib; { diff --git a/pkgs/development/python-modules/kaptan/default.nix b/pkgs/development/python-modules/kaptan/default.nix index 35194294e9d..aada19dd45b 100644 --- a/pkgs/development/python-modules/kaptan/default.nix +++ b/pkgs/development/python-modules/kaptan/default.nix @@ -13,6 +13,12 @@ buildPythonPackage rec { sha256 = "8403d6e48200c3f49cb6d6b3dcb5898aa5ab9d820831655bf9a2403e00cd4207"; }; + # https://github.com/emre/kaptan/pull/151 + postPatch = '' + substituteInPlace requirements/base.txt \ + --replace "PyYAML>=3.13,<4" "PyYAML>=3.13" + ''; + propagatedBuildInputs = [ pyyaml ]; # No tests in archive diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix index 820b4c1696b..f3965b8a74a 100644 --- a/pkgs/development/python-modules/mt-940/default.nix +++ b/pkgs/development/python-modules/mt-940/default.nix @@ -1,36 +1,27 @@ -{ buildPythonPackage, stdenv, pyyaml, pytest, enum34 -, pytestpep8, pytest-flakes, fetchFromGitHub, isPy3k, lib, glibcLocales +{ lib, buildPythonPackage, fetchPypi, isPy3k +, enum34, pyyaml, pytest }: buildPythonPackage rec { - version = "4.13.2"; + version = "4.15.0"; pname = "mt-940"; - # No tests in PyPI tarball - # See https://github.com/WoLpH/mt940/pull/72 - src = fetchFromGitHub { - owner = "WoLpH"; - repo = "mt940"; - rev = "v${version}"; - sha256 = "1lvw3qyv7qhjabcvg55br8x4pnc7hv8xzzaf6wnr8cfjg0q7dzzg"; + src = fetchPypi { + inherit pname version; + sha256 = "4c1d5c23a9c3fec12a61ce3f61d8be107b4693be4a4b97381eca23f4a4dca8ed"; }; - postPatch = '' - # No coverage report - sed -i "/--\(no-\)\?cov/d" pytest.ini - ''; - propagatedBuildInputs = lib.optional (!isPy3k) enum34; - checkInputs = [ pyyaml pytestpep8 pytest-flakes pytest ]; + checkInputs = [ pyyaml pytest ]; checkPhase = '' py.test ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation"; - inherit (src.meta) homepage; + homepage = https://github.com/WoLpH/mt940; license = licenses.bsd3; }; } diff --git a/pkgs/development/python-modules/pytoml/default.nix b/pkgs/development/python-modules/pytoml/default.nix index 91661a1fb51..d65de812323 100644 --- a/pkgs/development/python-modules/pytoml/default.nix +++ b/pkgs/development/python-modules/pytoml/default.nix @@ -1,23 +1,29 @@ { stdenv , buildPythonPackage -, fetchgit +, fetchFromGitHub , python +, pytest }: buildPythonPackage rec { pname = "pytoml"; - version = "0.1.14"; + version = "0.1.20"; + + src = fetchFromGitHub { + owner = "avakar"; + repo = "pytoml"; + rev = "v${version}"; + fetchSubmodules = true; # ensure test submodule is available + sha256 = "02hjq44zhh6z0fsbm3hvz34sav6fic90sjrw8g1pkdvskzzl46mz"; + }; + + checkInputs = [ pytest ]; checkPhase = '' ${python.interpreter} test/test.py + pytest test ''; - # fetchgit used to ensure test submodule is available - src = fetchgit { - url = "${meta.homepage}.git"; - rev = "refs/tags/v${version}"; - sha256 = "1ip71yqxnyi4jhw5x1q7a0za61ndhpfh0vbx08jfv0w4ayng6rgv"; - }; meta = with stdenv.lib; { description = "A TOML parser/writer for Python"; diff --git a/pkgs/development/python-modules/pyyaml/default.nix b/pkgs/development/python-modules/pyyaml/default.nix index b4732e34c4e..84dfb549fe1 100644 --- a/pkgs/development/python-modules/pyyaml/default.nix +++ b/pkgs/development/python-modules/pyyaml/default.nix @@ -1,17 +1,22 @@ -{ lib, buildPythonPackage, fetchPypi, libyaml, buildPackages }: +{ lib, buildPythonPackage, fetchPypi, cython, libyaml, buildPackages }: buildPythonPackage rec { pname = "PyYAML"; - version = "3.13"; + version = "5.1"; src = fetchPypi { inherit pname version; - sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf"; + sha256 = "436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95"; }; - nativeBuildInputs = [ buildPackages.stdenv.cc ]; + # force regeneration using Cython + postPatch = '' + rm ext/_yaml.c + ''; - propagatedBuildInputs = [ libyaml ]; + nativeBuildInputs = [ cython buildPackages.stdenv.cc ]; + + buildInputs = [ libyaml ]; meta = with lib; { description = "The next generation YAML parser and emitter for Python"; diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index 8ae56834702..ed7babf4933 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -37,6 +37,13 @@ let newPython = python3.override { sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8"; }; }); + pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec { + version = "3.13"; + src = oldAttrs.src.override { + inherit version; + sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf"; + }; + }); }; }; diff --git a/pkgs/development/tools/remarshal/default.nix b/pkgs/development/tools/remarshal/default.nix index 6632d062633..10bfd0c2f2d 100644 --- a/pkgs/development/tools/remarshal/default.nix +++ b/pkgs/development/tools/remarshal/default.nix @@ -2,13 +2,11 @@ python3Packages.buildPythonApplication rec { pname = "remarshal"; - version = "0.8.0"; + version = "0.9.1"; - src = fetchFromGitHub { - owner = "dbohdan"; - repo = "remarshal"; - rev = "v${version}"; - sha256 = "192r1mfd5yj6kg6fqmkjngdlgn25g5rkvm0p6xaflpvavnhvhnsj"; + src = python3Packages.fetchPypi { + inherit pname version; + sha256 = "564ffe9cbde85bd28a9c184b90c764abd2003abd6101a30802262198b5c7fc40"; }; propagatedBuildInputs = with python3Packages; [ diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix index c36b6d2fbd6..e09833869d6 100644 --- a/pkgs/tools/admin/awscli/default.nix +++ b/pkgs/tools/admin/awscli/default.nix @@ -21,6 +21,13 @@ let sha256 = "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1"; }; }); + pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec { + version = "3.13"; + src = oldAttrs.src.override { + inherit version; + sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf"; + }; + }); }; }; diff --git a/pkgs/tools/misc/pubs/default.nix b/pkgs/tools/misc/pubs/default.nix index fcf67870e87..4e840957ce3 100644 --- a/pkgs/tools/misc/pubs/default.nix +++ b/pkgs/tools/misc/pubs/default.nix @@ -11,11 +11,18 @@ python3Packages.buildPythonApplication rec { sha256 = "16zwdqfbmlla6906g3a57a4nj8wnl11fq78r20qms717bzv211j0"; }; - # Fix for bibtexparser 1.1.0 - patches = fetchpatch { - url = https://github.com/pubs/pubs/pull/185/commits/e58ae98b93b8364a07fd5f5f452ba88ad332c948.patch; - sha256 = "1n7zrk119v395jj8wqg8wlymc9l9pq3v752yy3kam9kflc0aashp"; - }; + patches = [ + # Fix for bibtexparser 1.1.0 + (fetchpatch { + url = https://github.com/pubs/pubs/pull/185/commits/e58ae98b93b8364a07fd5f5f452ba88ad332c948.patch; + sha256 = "1n7zrk119v395jj8wqg8wlymc9l9pq3v752yy3kam9kflc0aashp"; + }) + # Fix test broken by PyYAML 5.1 + (fetchpatch { + url = https://github.com/pubs/pubs/pull/194/commits/c3cb713ae76528eeeaaeb948fe319a76ab3934d8.patch; + sha256 = "05as418m7wzs65839bb91b2jrs8l68z8ldcjcd9cn4b9fcgsf3rk"; + }) + ]; propagatedBuildInputs = with python3Packages; [ argcomplete dateutil configobj feedparser bibtexparser pyyaml requests six beautifulsoup4