python3Packages.example-robot-data: depend on pkgs.example-robot-data
instead of rebuild, use the new BUILD_STANDALONE_PYTHON_INTERFACE feature. this also allow to break the circular depency and use: example-robot-data -> pinocchio -> python3Packages.pinocchio -> python3Packages.example-robot-data
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
lib,
|
||||
jrl-cmakemodules,
|
||||
pkg-config,
|
||||
pythonSupport ? false,
|
||||
python3Packages,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
@@ -32,25 +30,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmake
|
||||
doxygen
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals pythonSupport [
|
||||
python3Packages.python
|
||||
python3Packages.pythonImportsCheckHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jrl-cmakemodules
|
||||
]
|
||||
++ lib.optionals pythonSupport [ python3Packages.pinocchio ];
|
||||
];
|
||||
|
||||
cmakeFlags = [ (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) ];
|
||||
cmakeFlags = [ (lib.cmakeBool "BUILD_PYTHON_INTERFACE" false) ];
|
||||
|
||||
doCheck = true;
|
||||
# The package expect to find an `example-robot-data/robots` folder somewhere
|
||||
# either in install prefix or in the sources
|
||||
# where it can find the meshes for unit tests
|
||||
preCheck = "ln -s source ../../example-robot-data";
|
||||
pythonImportsCheck = [ "example_robot_data" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Set of robot URDFs for benchmarking and developed examples";
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
|
||||
toPythonModule,
|
||||
pythonImportsCheckHook,
|
||||
|
||||
example-robot-data,
|
||||
|
||||
python,
|
||||
pinocchio,
|
||||
}:
|
||||
toPythonModule (
|
||||
example-robot-data.overrideAttrs (super: {
|
||||
pname = "py-${super.pname}";
|
||||
|
||||
cmakeFlags = super.cmakeFlags ++ [
|
||||
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
|
||||
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
|
||||
];
|
||||
|
||||
nativeBuildInputs = super.nativeBuildInputs ++ [
|
||||
python
|
||||
];
|
||||
|
||||
propagatedBuildInputs = super.propagatedBuildInputs ++ [
|
||||
example-robot-data
|
||||
pinocchio
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pythonImportsCheckHook
|
||||
];
|
||||
|
||||
# The package expect to find an `example-robot-data/robots` folder somewhere
|
||||
# either in install prefix or in the sources
|
||||
# where it can find the meshes for unit tests
|
||||
preCheck = ''
|
||||
ln -s source ../../example-robot-data
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "example_robot_data" ];
|
||||
})
|
||||
)
|
||||
@@ -4898,12 +4898,9 @@ self: super: with self; {
|
||||
|
||||
ewmhlib = callPackage ../development/python-modules/ewmhlib { };
|
||||
|
||||
example-robot-data = toPythonModule (
|
||||
pkgs.example-robot-data.override {
|
||||
pythonSupport = true;
|
||||
python3Packages = self;
|
||||
}
|
||||
);
|
||||
example-robot-data = callPackage ../development/python-modules/example-robot-data {
|
||||
inherit (pkgs) example-robot-data;
|
||||
};
|
||||
|
||||
exceptiongroup = callPackage ../development/python-modules/exceptiongroup { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user