diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc47e09..cb744dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,35 +34,23 @@ set(PROJECT_USE_CMAKE_EXPORT TRUE)
set(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE)
set(CXX_DISABLE_WERROR TRUE)
-# Check if the submodule cmake have been initialized
-set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
-if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
- message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
+find_package(jrl-cmakemodules QUIET CONFIG)
+if(jrl-cmakemodules_FOUND)
+ get_property(
+ JRL_CMAKE_MODULES
+ TARGET jrl-cmakemodules::jrl-cmakemodules
+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES
+ )
+ message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
else()
- find_package(jrl-cmakemodules QUIET CONFIG)
- if(jrl-cmakemodules_FOUND)
- get_property(
- JRL_CMAKE_MODULES
- TARGET jrl-cmakemodules::jrl-cmakemodules
- PROPERTY INTERFACE_INCLUDE_DIRECTORIES
- )
- message(
- STATUS
- "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}"
- )
- else()
- message(STATUS "JRL cmakemodules not found. Let's fetch it.")
- include(FetchContent)
- FetchContent_Declare(
- "jrl-cmakemodules"
- GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
- )
- FetchContent_MakeAvailable("jrl-cmakemodules")
- FetchContent_GetProperties(
- "jrl-cmakemodules"
- SOURCE_DIR JRL_CMAKE_MODULES
- )
- endif()
+ message(STATUS "JRL cmakemodules not found. Let's fetch it.")
+ include(FetchContent)
+ FetchContent_Declare(
+ "jrl-cmakemodules"
+ GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
+ )
+ FetchContent_MakeAvailable("jrl-cmakemodules")
+ FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
endif()
include("${JRL_CMAKE_MODULES}/hpp.cmake")
@@ -81,7 +69,10 @@ option(USE_JS "Run npm install and build from cmake" ON)
option(USE_QT "Start Qt window" OFF)
# Python bindings for native graph viewer
-set(PYTHON_COMPONENTS Interpreter Development NumPy)
+set(PYTHON_COMPONENTS Interpreter)
+if(USE_QT)
+ set(PYTHON_COMPONENTS Interpreter Development NumPy)
+endif()
findpython()
if(USE_QT)
diff --git a/dockgen.toml b/dockgen.toml
index 6f966b0..0e30ebd 100644
--- a/dockgen.toml
+++ b/dockgen.toml
@@ -1,3 +1,3 @@
[hpp-plot]
-apt_deps = ["npm", "python3-numpy"]
+apt_deps = ["npm"]
url = "."
diff --git a/flake.lock b/flake.lock
index 186c43a..d77b63b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -205,11 +205,11 @@
]
},
"locked": {
- "lastModified": 1783827672,
- "narHash": "sha256-uAh4095wPLUjrjJo0lb6EL4VtcX0wp6YJp9Vm4I6t2Y=",
+ "lastModified": 1784295348,
+ "narHash": "sha256-hZYhxeG510Ui/RSviEM7KyON8RiQoHFD7SY3y4+1zKA=",
"owner": "gepetto",
"repo": "nix",
- "rev": "9ddcf388cd74fdbc6f832befbcbd9a8bb902c704",
+ "rev": "166caeac8f09def7818c47bbfcc08777c2c3fbc4",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 357cf56..ea625a9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,7 +11,6 @@
overrideAttrs.hpp-plot =
{
drv-final,
- drv-prev,
pkgs-final,
...
}:
@@ -29,34 +28,11 @@
./src
];
};
- cmakeFlags = [
- (lib.cmakeBool "USE_JS" false) # build from nix not cmake
- ];
- postPatch = ''
- # prepare npm offline cache
- mkdir -p node_modules
- cd src/web_app
- cp package.json package-lock.json ../..
- ln -s ../../node_modules
- cd -
- '';
- nativeBuildInputs = drv-prev.nativeBuildInputs ++ [
- pkgs-final.npmHooks.npmConfigHook
- pkgs-final.nodejs
- ];
npmDeps = pkgs-final.fetchNpmDeps {
name = "${drv-final.pname}-${drv-final.version}-npm-deps";
src = drv-final.src + "/src/web_app/";
hash = "sha256-GAYdugZFMygk0MXyXxf2wSsWRvn/aW4YeFH2v62IZjI=";
};
- preBuild = ''
- cd ../src/web_app
- npm --offline run build
- cd -
- '';
- postInstall = ''
- cp -r ../src/web_app/dist $out/share/hpp-plot/webapp
- '';
};
}
);
diff --git a/package.xml b/package.xml
index 8a64ec7..cf7ee40 100644
--- a/package.xml
+++ b/package.xml
@@ -14,7 +14,6 @@
python3
python3-dev
- python3-numpy
cmake
doxygen
diff --git a/pyproject.toml b/pyproject.toml
index e14e5b7..6dfa275 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,21 @@
-[tool.ruff]
-extend-exclude = ["cmake"]
+[build-system]
+build-backend = "cmeel"
+requires = [
+ "cmeel[build]",
+ "jrl-cmakemodules[build]"
+]
+
+[project]
+description = "Plotting tools for HPP"
+license = "BSD-2-Clause"
+name = "hpp-plot"
+requires-python = ">= 3.10"
+version = "9.0.0"
+
+[project.urls]
+homepage = "https://github.com/cmake-wheel/hpp-plot"
+repository = "https://github.com/cmake-wheel/hpp-plot.git"
+upstream = "https://github.com/humanoid-path-planner/hpp-plot"
[tool.ruff.lint]
extend-select = ["I", "NPY", "RUF", "UP", "W"]