1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 pythonOlder,
7 oldest-supported-numpy,
8 setuptools,
9 ansitable,
10 matplotlib,
11 numpy,
12 scipy,
13 typing-extensions,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "spatialmath-python";
19 version = "1.1.14";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchPypi {
25 pname = "spatialmath_python";
26 inherit version;
27 hash = "sha256-DI5+aSmAlOSbUSPPOrnMoSDBG+xp4zxURSGtZbsv5X4=";
28 };
29
30 build-system = [
31 oldest-supported-numpy
32 setuptools
33 ];
34
35 pythonRemoveDeps = [ "pre-commit" ];
36
37 pythonRelaxDeps = [ "matplotlib" ];
38
39 dependencies = [
40 ansitable
41 matplotlib
42 numpy
43 scipy
44 typing-extensions
45 ];
46
47 pythonImportsCheck = [ "spatialmath" ];
48
49 nativeCheckInputs = [ pytestCheckHook ];
50
51 disabledTestPaths = [
52 # tests hang
53 "tests/test_spline.py"
54 ];
55
56 env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "Agg";
57
58 meta = with lib; {
59 description = "Provides spatial maths capability for Python";
60 homepage = "https://pypi.org/project/spatialmath-python/";
61 license = licenses.mit;
62 maintainers = with maintainers; [
63 djacu
64 a-camarillo
65 ];
66 };
67}