From 5a65614cbdf083be2f339c645e967869e292ffb1 Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Mon, 2 May 2022 02:53:13 +0200 Subject: [PATCH 1/3] pythonPackages.versioningit: init at 2.0.1 --- .../python-modules/versioningit/default.nix | 68 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 70 insertions(+) create mode 100644 pkgs/development/python-modules/versioningit/default.nix diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix new file mode 100644 index 000000000000..74cccb73cb5b --- /dev/null +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -0,0 +1,68 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, importlib-metadata +, packaging +, setuptools +, tomli +, pytestCheckHook +, build +, pydantic +, pytest-mock +, git +, mercurial +}: + +buildPythonPackage rec { + pname = "versioningit"; + version = "2.0.1"; + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-gJfiYNm99nZYW9gTO/e1//rDeox2KWJVtC2Gy1EqsuM="; + }; + + propagatedBuildInputs = [ + packaging + setuptools + tomli + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata + ]; + + checkInputs = [ + pytestCheckHook + build + pydantic + pytest-mock + git + mercurial + ]; + + disabledTests = [ + # wants to write to the Nix store + "test_editable_mode" + ]; + + preCheck = '' + substituteInPlace tox.ini \ + --replace "--cov=versioningit" "" \ + --replace "--cov-config=tox.ini" "" \ + --replace "--no-cov-on-fail" "" + ''; + + pythonImportsCheck = [ + "versioningit" + ]; + + meta = with lib; { + description = "setuptools plugin for determining package version from VCS"; + homepage = "https://github.com/jwodder/versioningit"; + changelog = "https://versioningit.readthedocs.io/en/latest/changelog.html"; + license = licenses.mit; + maintainers = with maintainers; [ DeeUnderscore ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb4600bcaaec..7f9b56ac5b81 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11526,6 +11526,8 @@ in { versionfinder = callPackage ../development/python-modules/versionfinder { }; + versioningit = callPackage ../development/python-modules/versioningit { }; + versiontag = callPackage ../development/python-modules/versiontag { }; versiontools = callPackage ../development/python-modules/versiontools { }; From 2034a3da5a0107070fc420bcce04c3de39d74892 Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Mon, 2 May 2022 03:03:05 +0200 Subject: [PATCH 2/3] streamlink: 3.2.0 -> 5.0.1 Changelogs: - https://github.com/streamlink/streamlink/releases/tag/4.0.0 - https://github.com/streamlink/streamlink/releases/tag/4.0.1 - https://github.com/streamlink/streamlink/releases/tag/4.1.0 - https://github.com/streamlink/streamlink/releases/tag/4.2.0 - https://github.com/streamlink/streamlink/releases/tag/4.3.0 - https://github.com/streamlink/streamlink/releases/tag/5.0.0 - https://github.com/streamlink/streamlink/releases/tag/5.0.1 Streamlink switched to the pyproject format in 4.0.0 --- pkgs/applications/video/streamlink/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/streamlink/default.nix b/pkgs/applications/video/streamlink/default.nix index 415790b4c11c..9f2487734f02 100644 --- a/pkgs/applications/video/streamlink/default.nix +++ b/pkgs/applications/video/streamlink/default.nix @@ -6,11 +6,12 @@ python3Packages.buildPythonApplication rec { pname = "streamlink"; - version = "3.2.0"; + version = "5.0.1"; + format = "pyproject"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "sha256-l3DS2DhExTeKc+FBMNy3YKvIVlZsqgpB/FuXoN7V2SY="; + hash = "sha256-PKRioPBhTV6i3ckQgcKuhQFmpBvUQE4o3FLej8qx4mM="; }; checkInputs = with python3Packages; [ @@ -20,6 +21,10 @@ python3Packages.buildPythonApplication rec { freezegun ]; + nativeBuildInputs = with python3Packages; [ + versioningit + ]; + propagatedBuildInputs = (with python3Packages; [ isodate lxml From 453efa3153cc5ce9b782b45861abba60876db10f Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 4 Oct 2022 15:06:21 +0200 Subject: [PATCH 3/3] python310Packages.versioningit: move patching to postPatch --- .../python-modules/versioningit/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix index 74cccb73cb5b..5f058d5f1b15 100644 --- a/pkgs/development/python-modules/versioningit/default.nix +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -25,6 +25,13 @@ buildPythonPackage rec { hash = "sha256-gJfiYNm99nZYW9gTO/e1//rDeox2KWJVtC2Gy1EqsuM="; }; + postPatch = '' + substituteInPlace tox.ini \ + --replace "--cov=versioningit" "" \ + --replace "--cov-config=tox.ini" "" \ + --replace "--no-cov-on-fail" "" + ''; + propagatedBuildInputs = [ packaging setuptools @@ -47,13 +54,6 @@ buildPythonPackage rec { "test_editable_mode" ]; - preCheck = '' - substituteInPlace tox.ini \ - --replace "--cov=versioningit" "" \ - --replace "--cov-config=tox.ini" "" \ - --replace "--no-cov-on-fail" "" - ''; - pythonImportsCheck = [ "versioningit" ];