From e2870d550b34124f419a27efd913d387d1b9af40 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 14 Sep 2022 23:36:16 +0200 Subject: [PATCH] python3Packages.PyHamcrest: 2.0.3 -> 2.0.4 --- .../python-modules/pyhamcrest/default.nix | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyhamcrest/default.nix b/pkgs/development/python-modules/pyhamcrest/default.nix index a4c04ce79ee6..ffe11cc140b3 100644 --- a/pkgs/development/python-modules/pyhamcrest/default.nix +++ b/pkgs/development/python-modules/pyhamcrest/default.nix @@ -1,20 +1,39 @@ -{ lib, buildPythonPackage, fetchPypi -, mock, pytest -, six +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatchling +, hatch-vcs +, numpy +, pythonOlder +, pytest-xdist +, pytestCheckHook }: -buildPythonPackage rec { - pname = "PyHamcrest"; - version = "2.0.3"; - src = fetchPypi { - inherit pname version; - sha256 = "dfb19cf6d71743e086fbb761ed7faea5aacbc8ec10c17a08b93ecde39192a3db"; +buildPythonPackage rec { + pname = "pyhamcrest"; + version = "2.0.4"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "hamcrest"; + repo = "PyHamcrest"; + rev = "refs/tags/V${version}"; + hash = "sha256-CIkttiijbJCR0zdmwM5JvFogQKYuHUXHJhdyWonHcGk="; }; - checkInputs = [ mock pytest ]; - propagatedBuildInputs = [ six ]; + SETUPTOOLS_SCM_PRETEND_VERSION = version; - doCheck = false; # pypi tarball does not include tests + nativeBuildInputs = [ + hatchling + hatch-vcs + ]; + + checkInputs = [ + numpy + pytest-xdist + pytestCheckHook + ]; meta = with lib; { homepage = "https://github.com/hamcrest/PyHamcrest";