1{
2 lib,
3 astor,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatch-vcs,
7 hatchling,
8 interface-meta,
9 numpy,
10 pandas,
11 pytestCheckHook,
12 pythonOlder,
13 scipy,
14 sympy,
15 typing-extensions,
16 wrapt,
17}:
18
19buildPythonPackage rec {
20 pname = "formulaic";
21 version = "1.1.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "matthewwardrop";
28 repo = "formulaic";
29 tag = "v${version}";
30 hash = "sha256-7vmnibL0PMZWL/unUQxN4GtLPSYKmGnhDNtE5GRDFHk=";
31 };
32
33 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
34
35 nativeBuildInputs = [
36 hatchling
37 hatch-vcs
38 ];
39
40 propagatedBuildInputs = [
41 astor
42 numpy
43 pandas
44 scipy
45 wrapt
46 typing-extensions
47 interface-meta
48 sympy
49 ];
50
51 nativeCheckInputs = [ pytestCheckHook ];
52
53 pythonImportsCheck = [ "formulaic" ];
54
55 disabledTestPaths = [ "tests/transforms/test_poly.py" ];
56
57 meta = with lib; {
58 description = "High-performance implementation of Wilkinson formulas";
59 homepage = "https://matthewwardrop.github.io/formulaic/";
60 changelog = "https://github.com/matthewwardrop/formulaic/releases/tag/${src.tag}";
61 license = licenses.mit;
62 maintainers = with maintainers; [ swflint ];
63 };
64}