1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonAtLeast,
6 toolz,
7 multipledispatch,
8 py,
9 pytestCheckHook,
10 pytest-html,
11 pytest-benchmark,
12}:
13
14buildPythonPackage rec {
15 pname = "logical-unification";
16 version = "0.4.6";
17 format = "setuptools";
18
19 src = fetchFromGitHub {
20 owner = "pythological";
21 repo = "unification";
22 tag = "v${version}";
23 hash = "sha256-uznmlkREFONU1YoI/+mcfb+Yg30NinWvsMxTfHCXzOU=";
24 };
25
26 propagatedBuildInputs = [
27 toolz
28 multipledispatch
29 ];
30
31 nativeCheckInputs = [
32 py
33 pytestCheckHook
34 pytest-html
35 pytest-benchmark # Needed for the `--benchmark-skip` flag
36 ];
37
38 disabledTests = lib.optionals (pythonAtLeast "3.12") [
39 # Failed: DID NOT RAISE <class 'RecursionError'>
40 "test_reify_recursion_limit"
41 ];
42
43 pytestFlags = [
44 "--benchmark-skip"
45 "--html=testing-report.html"
46 "--self-contained-html"
47 ];
48
49 pythonImportsCheck = [ "unification" ];
50
51 meta = with lib; {
52 description = "Straightforward unification in Python that's extensible via generic functions";
53 homepage = "https://github.com/pythological/unification";
54 changelog = "https://github.com/pythological/unification/releases";
55 license = licenses.bsd3;
56 maintainers = with maintainers; [ Etjean ];
57 };
58}