From 53e1df4e30fa095d5f100a2d16115b4860a18afc Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 1 Aug 2019 13:22:09 -0700 Subject: [PATCH 1/4] pythonPackages.elementpath: init at 1.1.8 --- .../python-modules/elementpath/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/elementpath/default.nix diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix new file mode 100644 index 00000000000..1d2d34541fa --- /dev/null +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -0,0 +1,26 @@ +{ buildPythonPackage +, lib +, fetchFromGitHub +}: + +buildPythonPackage rec { + version = "1.1.8"; + pname = "elementpath"; + + src = fetchFromGitHub { + owner = "sissaschool"; + repo = "elementpath"; + rev = "v${version}"; + sha256 = "0krczvf8r6pb3hb8qaxl9h2b4qwg180xk66gyxjf002im7ri75aj"; + }; + + # avoid circular dependency with xmlschema which directly depends on this + doCheck = false; + + meta = with lib; { + description = "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml"; + homepage = "https://github.com/sissaschool/elementpath"; + license = licenses.mit; + maintainers = with maintainers; [ jonringer ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7bc682e3da5..c7960565648 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2178,6 +2178,8 @@ in { elasticsearch-curator = callPackage ../development/python-modules/elasticsearch-curator { }; + elementpath = callPackage ../development/python-modules/elementpath { }; + entrypoints = callPackage ../development/python-modules/entrypoints { }; enzyme = callPackage ../development/python-modules/enzyme {}; From a7279ea9dc2258dcca834983567bb26e8168e021 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 1 Aug 2019 13:23:23 -0700 Subject: [PATCH 2/4] pythonPackages.xmlschema: init at 1.0.13 --- .../python-modules/xmlschema/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/xmlschema/default.nix diff --git a/pkgs/development/python-modules/xmlschema/default.nix b/pkgs/development/python-modules/xmlschema/default.nix new file mode 100644 index 00000000000..c021bde60cd --- /dev/null +++ b/pkgs/development/python-modules/xmlschema/default.nix @@ -0,0 +1,39 @@ +{ lib, buildPythonPackage, fetchFromGitHub +, elementpath +, pytest +}: + +buildPythonPackage rec { + version = "1.0.13"; + pname = "xmlschema"; + + src = fetchFromGitHub { + owner = "sissaschool"; + repo = "xmlschema"; + rev = "v${version}"; + sha256 = "182439gqhlxhr9rdi9ak33z4ffy1w9syhykkckkl6mq050c80qdr"; + }; + + propagatedBuildInputs = [ elementpath ]; + + checkInputs = [ pytest ]; + + # Ignore broken fixtures, and tests for files which don't exist. + # For darwin, we need to explicity say we can't reach network + checkPhase = '' + substituteInPlace xmlschema/tests/__init__.py \ + --replace "SKIP_REMOTE_TESTS = " "SKIP_REMOTE_TESTS = True #" + pytest . \ + --ignore=xmlschema/tests/test_factory.py \ + --ignore=xmlschema/tests/test_validators.py \ + --ignore=xmlschema/tests/test_schemas.py \ + -k 'not element_tree_import_script' + ''; + + meta = with lib; { + description = "XML Schema validator and data conversion library for Python"; + homepage = "https://github.com/sissaschool/xmlschema"; + license = licenses.mit; + maintainers = with maintainers; [ jonringer ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c7960565648..d7b317d444b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4949,6 +4949,8 @@ in { xml2rfc = callPackage ../development/python-modules/xml2rfc { }; + xmlschema = callPackage ../development/python-modules/xmlschema { }; + xmltodict = callPackage ../development/python-modules/xmltodict { }; xarray = callPackage ../development/python-modules/xarray { }; From 2fad3c5a740c038019f6ce4c61c75f5b6759b89e Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 1 Aug 2019 13:28:44 -0700 Subject: [PATCH 3/4] pythonPackages.sepaxml: 2.0.0 -> 2.1.0 --- .../python-modules/sepaxml/default.nix | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/sepaxml/default.nix b/pkgs/development/python-modules/sepaxml/default.nix index deb24a7130a..6e6809663a6 100644 --- a/pkgs/development/python-modules/sepaxml/default.nix +++ b/pkgs/development/python-modules/sepaxml/default.nix @@ -1,17 +1,32 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy3k }: +{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27 +, lxml +, pytest +, text-unidecode +, xmlschema +}: buildPythonPackage rec { - version = "2.0.0"; + version = "2.1.0"; pname = "sepaxml"; - disabled = !isPy3k; + disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "0jhj8fa0lbyaw15q485kyyli9qgrmqr47a6z6pgqm40kwmjghiyc"; + src = fetchFromGitHub { + owner = "raphaelm"; + repo = "python-sepaxml"; + rev = version; + sha256 = "0lkb0nnyxmwvm6gkwls8w2290b66lwz9bv8p39wwcn7flabviwhj"; }; - # no tests included in PyPI package - doCheck = false; + propagatedBuildInputs = [ + text-unidecode + xmlschema + ]; + + checkInputs = [ pytest lxml ]; + + checkPhase = '' + pytest + ''; meta = with stdenv.lib; { homepage = https://github.com/raphaelm/python-sepaxml/; From 860e49b3327c3cf7ec03d8c59d24062b49c73588 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 1 Aug 2019 14:27:08 -0700 Subject: [PATCH 4/4] python3Packages.fints: 2.1.1 -> 2.2.0 --- .../python-modules/fints/default.nix | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/fints/default.nix b/pkgs/development/python-modules/fints/default.nix index 4d9d250815a..f780c76fd6d 100644 --- a/pkgs/development/python-modules/fints/default.nix +++ b/pkgs/development/python-modules/fints/default.nix @@ -1,20 +1,36 @@ -{ stdenv, buildPythonPackage, fetchPypi, - requests, mt-940, sepaxml, bleach, isPy3k }: +{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27 +, bleach +, mt-940 +, pytest +, requests +, sepaxml +}: buildPythonPackage rec { - version = "2.1.1"; + version = "2.2.0"; pname = "fints"; - disabled = !isPy3k; + disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "06p6p0xxw0n10hmf7z4k1l29fya0sja433s6lasjr1bal5asdhaq"; + src = fetchFromGitHub { + owner = "raphaelm"; + repo = "python-fints"; + rev = "v${version}"; + sha256 = "1gx173dzdprf3jsc7dss0xax8s6l2hr02qg9m5c4rksb3dl5fl8w"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace 'sepaxml==2.0.*' 'sepaxml~=2.0' + ''; + propagatedBuildInputs = [ requests mt-940 sepaxml bleach ]; - # no tests included in PyPI package - doCheck = false; + checkInputs = [ pytest ]; + + # ignore network calls and broken fixture + checkPhase = '' + pytest . --ignore=tests/test_client.py -k 'not robust_mode' + ''; meta = with stdenv.lib; { homepage = https://github.com/raphaelm/python-fints/;