1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 oldest-supported-numpy,
7 setuptools,
8 ansitable,
9 matplotlib,
10 numpy,
11 scipy,
12 typing-extensions,
13 coverage,
14 flake8,
15 pytest,
16 pytest-timeout,
17 pytest-xvfb,
18 sympy,
19 pytestCheckHook,
20 pythonRelaxDepsHook,
21}:
22
23buildPythonPackage rec {
24 pname = "spatialmath-python";
25 version = "1.1.10";
26 pyproject = true;
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchPypi {
31 pname = "spatialmath_python";
32 inherit version;
33 hash = "sha256-7h29RHCrxdexpabtxMQx/7RahQmCDGHhdJ1WETvtfYg=";
34 };
35
36 nativeBuildInputs = [
37 oldest-supported-numpy
38 setuptools
39 pythonRelaxDepsHook
40 ];
41
42 pythonRemoveDeps = [ "pre-commit" ];
43
44 propagatedBuildInputs = [
45 ansitable
46 matplotlib
47 numpy
48 scipy
49 typing-extensions
50 ];
51
52 passthru.optional-dependencies = {
53 dev = [
54 coverage
55 flake8
56 pytest
57 pytest-timeout
58 pytest-xvfb
59 sympy
60 ];
61 };
62
63 pythonImportsCheck = [ "spatialmath" ];
64
65 nativeCheckInputs = [ pytestCheckHook ];
66
67 meta = with lib; {
68 description = "Provides spatial maths capability for Python";
69 homepage = "https://pypi.org/project/spatialmath-python/";
70 license = licenses.mit;
71 maintainers = with maintainers; [
72 djacu
73 a-camarillo
74 ];
75 };
76}