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