From 95794c43d96eadc60dc4492bcf391072b77b4c76 Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Mon, 22 Mar 2021 14:20:26 +0100 Subject: [PATCH 1/2] pythonPackages.arrow_1: init at 1.0.3 This is an alternative arrow package for the new major version one. The other package is still at 0.17 and bumping it will result in a huge amount of rebuilds. However, some packages are depending on the new release, e.g., watson. --- pkgs/development/python-modules/arrow/1.nix | 41 +++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/arrow/1.nix diff --git a/pkgs/development/python-modules/arrow/1.nix b/pkgs/development/python-modules/arrow/1.nix new file mode 100644 index 00000000000000..f9b830762b30e7 --- /dev/null +++ b/pkgs/development/python-modules/arrow/1.nix @@ -0,0 +1,41 @@ +{ lib, buildPythonPackage, fetchPypi, pythonOlder +, simplejson, typing-extensions, python-dateutil, pytz, pytest-mock, sphinx +, dateparser, pytestcov, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "arrow"; + version = "1.0.3"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0793badh4hgbk2c5g70hmbl7n3d4g5d87bcflld0w9rjwy59r71r"; + }; + + propagatedBuildInputs = [ python-dateutil ] + ++ lib.optionals (!pythonOlder "3.8") [ typing-extensions ]; + + checkInputs = [ + dateparser + pytestCheckHook + pytestcov + pytest-mock + pytz + simplejson + sphinx + ]; + + # ParserError: Could not parse timezone expression "America/Nuuk" + disabledTests = [ + "test_parse_tz_name_zzz" + ]; + + meta = with lib; { + description = "Python library for date manipulation"; + homepage = "https://github.com/crsmithdev/arrow"; + license = licenses.asl20; + maintainers = with maintainers; [ thoughtpolice oxzi ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ae06f4348b315b..5c6423b3109629 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -482,6 +482,8 @@ in { arrow = callPackage ../development/python-modules/arrow { }; + arrow_1 = callPackage ../development/python-modules/arrow/1.nix { }; + arviz = callPackage ../development/python-modules/arviz { }; arxiv2bib = callPackage ../development/python-modules/arxiv2bib { }; From 6e7740fb0cca900330532d77e6dfdffe7645272e Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Mon, 22 Mar 2021 14:29:01 +0100 Subject: [PATCH 2/2] watson: 1.10.0 -> 2.0.0 Co-authored-by: Sandro --- pkgs/applications/office/watson/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/office/watson/default.nix b/pkgs/applications/office/watson/default.nix index 18c1b9469e75bd..c305c771417822 100644 --- a/pkgs/applications/office/watson/default.nix +++ b/pkgs/applications/office/watson/default.nix @@ -4,26 +4,22 @@ with pythonPackages; buildPythonApplication rec { pname = "watson"; - version = "1.10.0"; + version = "2.0.0"; src = fetchFromGitHub { owner = "TailorDev"; repo = "Watson"; rev = version; - sha256 = "1s0k86ldqky6avwjaxkw1y02wyf59qwqldcahy3lhjn1b5dgsb3s"; + sha256 = "1yxqjirv7cpg4hqj4l3a53p3p3kl82bcx6drgvl9v849vcc3l7s0"; }; - checkPhase = '' - pytest -vs tests - ''; - postInstall = '' installShellCompletion --bash --name watson watson.completion installShellCompletion --zsh --name _watson watson.zsh-completion ''; - checkInputs = [ py pytest pytest-datafiles pytest-mock pytestrunner ]; - propagatedBuildInputs = [ arrow click click-didyoumean requests ]; + checkInputs = [ pytestCheckHook pytest-mock mock pytest-datafiles ]; + propagatedBuildInputs = [ arrow_1 click click-didyoumean requests ]; nativeBuildInputs = [ installShellFiles ]; meta = with lib; {