From c24313730ad80d165f7a1104f6431749ae16881b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 28 Jun 2023 23:39:18 -0700 Subject: [PATCH 1/2] python310Packages.pluggy: 1.0.0 -> 1.2.0 Diff: https://github.com/pytest-dev/pluggy/compare/refs/tags/1.0.0...1.2.0 Changelog: https://github.com/pytest-dev/pluggy/blob/refs/tags/1.2.0/CHANGELOG.rst --- .../development/python-modules/pluggy/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pluggy/default.nix b/pkgs/development/python-modules/pluggy/default.nix index 46aebb519500..a3ae368379ac 100644 --- a/pkgs/development/python-modules/pluggy/default.nix +++ b/pkgs/development/python-modules/pluggy/default.nix @@ -1,6 +1,6 @@ { buildPythonPackage , lib -, fetchPypi +, fetchFromGitHub , setuptools-scm , pythonOlder , importlib-metadata @@ -8,16 +8,20 @@ buildPythonPackage rec { pname = "pluggy"; - version = "1.0.0"; + version = "1.2.0"; format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"; + src = fetchFromGitHub { + owner = "pytest-dev"; + repo = "pluggy"; + rev = "refs/tags/${version}"; + hash = "sha256-SzJu7ITdmUgusn8sz6fRBpxTMQncWIViP5NCAj4q4GM="; }; nativeBuildInputs = [ setuptools-scm ]; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; @@ -26,6 +30,7 @@ buildPythonPackage rec { doCheck = false; meta = { + changelog = "https://github.com/pytest-dev/pluggy/blob/${src.rev}/CHANGELOG.rst"; description = "Plugin and hook calling mechanisms for Python"; homepage = "https://github.com/pytest-dev/pluggy"; license = lib.licenses.mit; From 2a376a59a343364d3dbcff5a28ff29493c4fbc0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 28 Jun 2023 23:55:18 -0700 Subject: [PATCH 2/2] python310Packages.pluggy: run tests --- .../python-modules/pluggy/default.nix | 4 ++++ .../python-modules/pluggy/tests.nix | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/python-modules/pluggy/tests.nix diff --git a/pkgs/development/python-modules/pluggy/default.nix b/pkgs/development/python-modules/pluggy/default.nix index a3ae368379ac..e6473e98a282 100644 --- a/pkgs/development/python-modules/pluggy/default.nix +++ b/pkgs/development/python-modules/pluggy/default.nix @@ -4,6 +4,7 @@ , setuptools-scm , pythonOlder , importlib-metadata +, callPackage }: buildPythonPackage rec { @@ -28,6 +29,9 @@ buildPythonPackage rec { # To prevent infinite recursion with pytest doCheck = false; + passthru.tests = { + pytest = callPackage ./tests.nix { }; + }; meta = { changelog = "https://github.com/pytest-dev/pluggy/blob/${src.rev}/CHANGELOG.rst"; diff --git a/pkgs/development/python-modules/pluggy/tests.nix b/pkgs/development/python-modules/pluggy/tests.nix new file mode 100644 index 000000000000..dc6e16e7b2d7 --- /dev/null +++ b/pkgs/development/python-modules/pluggy/tests.nix @@ -0,0 +1,20 @@ +{ buildPythonPackage +, pluggy +, pytestCheckHook +}: + +buildPythonPackage { + pname = "pluggy-tests"; + inherit (pluggy) version; + format = "other"; + + inherit (pluggy) src; + + dontBuild = true; + dontInstall = true; + + nativeCheckInputs = [ + pluggy + pytestCheckHook + ]; +}