Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / matchpy / default.nix
blob259038e7774ba1716375927f99bf5a8ff133375c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , hopcroftkarp
6 , multiset
7 , pytestCheckHook
8 , hypothesis
9 , setuptools-scm
10 , isPy27
13 buildPythonPackage rec {
14   pname = "matchpy";
15   version = "0.5.5"; # Don't upgrade to 4.3.1, this tag is very old
16   format = "setuptools";
17   disabled = isPy27;
19   src = fetchFromGitHub {
20     owner = "HPAC";
21     repo = pname;
22     rev = version;
23     hash = "sha256-n5rXIjqVQZzEbfIZVQiGLh2PR1DHAJ9gumcrbvwnasA=";
24   };
26   patches = [
27     # https://github.com/HPAC/matchpy/pull/77
28     (fetchpatch {
29       name = "fix-versioneer-py312.patch";
30       url = "https://github.com/HPAC/matchpy/commit/965d7c39689b9f2473a78ed06b83f2be701e234d.patch";
31       hash = "sha256-xXADCSIhq1ARny2twzrhR1J8LkMFWFl6tmGxrM8RvkU=";
32     })
33   ];
35   postPatch = ''
36     sed -i '/pytest-runner/d' setup.cfg
38     substituteInPlace setup.cfg \
39       --replace "multiset>=2.0,<3.0" "multiset"
40   '';
42   nativeBuildInputs = [
43     setuptools-scm
44   ];
46   propagatedBuildInputs = [
47     hopcroftkarp
48     multiset
49   ];
51   nativeCheckInputs = [
52     pytestCheckHook
53     hypothesis
54   ];
56   pythonImportsCheck = [
57     "matchpy"
58   ];
60   meta = with lib; {
61     description = "A library for pattern matching on symbolic expressions";
62     homepage = "https://github.com/HPAC/matchpy";
63     license = licenses.mit;
64     maintainers = with maintainers; [ ];
65   };