`buildDotnetModule`: add support for installing pre-release tools (#374663)
[NixPkgs.git] / pkgs / development / python-modules / parameterized / default.nix
blob62663c9cd9da7a326c5dff9f11ab298b68ac5b9a
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   fetchpatch2,
6   mock,
7   pytestCheckHook,
8   pythonOlder,
9   setuptools,
12 buildPythonPackage rec {
13   pname = "parameterized";
14   version = "0.9.0";
15   format = "pyproject";
17   disabled = pythonOlder "3.7";
19   src = fetchPypi {
20     inherit pname version;
21     hash = "sha256-f8kFJyzvpPNkwaNCnLvpwPmLeTmI77W/kKrIDwjbCbE=";
22   };
24   patches = [
25     (fetchpatch2 {
26       name = "parameterized-docstring-3.13-compat.patch";
27       url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch?id=dec60bb6900d6ebdaaa6aa1dcb845b30b739f9b5";
28       hash = "sha256-tWcN0eRC0oRHrOaa/cctXLhi1WapDKvxO36e6gU6UIk=";
29     })
30   ];
32   postPatch = ''
33     # broken with pytest 7 and python 3.12
34     # https://github.com/wolever/parameterized/issues/167
35     # https://github.com/wolever/parameterized/pull/162
36     substituteInPlace parameterized/test.py \
37       --replace 'assert_equal(missing, [])' "" \
38       --replace "assertRaisesRegexp" "assertRaisesRegex"
39   '';
41   nativeBuildInputs = [ setuptools ];
43   checkInputs = [
44     mock
45     pytestCheckHook
46   ];
48   pytestFlagsArray = [ "parameterized/test.py" ];
50   pythonImportsCheck = [ "parameterized" ];
52   meta = with lib; {
53     description = "Parameterized testing with any Python test framework";
54     homepage = "https://github.com/wolever/parameterized";
55     changelog = "https://github.com/wolever/parameterized/blob/v${version}/CHANGELOG.txt";
56     license = licenses.bsd2;
57     maintainers = [ ];
58   };