anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / matchpy / default.nix
blob304f143b884b0356ecd87b4cc82edc2d0d91343e
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   hopcroftkarp,
7   multiset,
8   pytestCheckHook,
9   hypothesis,
10   setuptools-scm,
11   isPy27,
14 buildPythonPackage rec {
15   pname = "matchpy";
16   version = "0.5.5"; # Don't upgrade to 4.3.1, this tag is very old
17   format = "setuptools";
18   disabled = isPy27;
20   src = fetchFromGitHub {
21     owner = "HPAC";
22     repo = pname;
23     rev = version;
24     hash = "sha256-n5rXIjqVQZzEbfIZVQiGLh2PR1DHAJ9gumcrbvwnasA=";
25   };
27   patches = [
28     # https://github.com/HPAC/matchpy/pull/77
29     (fetchpatch {
30       name = "fix-versioneer-py312.patch";
31       url = "https://github.com/HPAC/matchpy/commit/965d7c39689b9f2473a78ed06b83f2be701e234d.patch";
32       hash = "sha256-xXADCSIhq1ARny2twzrhR1J8LkMFWFl6tmGxrM8RvkU=";
33     })
34   ];
36   postPatch = ''
37     sed -i '/pytest-runner/d' setup.cfg
39     substituteInPlace setup.cfg \
40       --replace "multiset>=2.0,<3.0" "multiset"
41   '';
43   nativeBuildInputs = [ setuptools-scm ];
45   propagatedBuildInputs = [
46     hopcroftkarp
47     multiset
48   ];
50   nativeCheckInputs = [
51     pytestCheckHook
52     hypothesis
53   ];
55   pythonImportsCheck = [ "matchpy" ];
57   meta = with lib; {
58     description = "Library for pattern matching on symbolic expressions";
59     homepage = "https://github.com/HPAC/matchpy";
60     license = licenses.mit;
61     maintainers = [ ];
62   };