Skip to content

Conversation

@jnbrunet
Copy link
Contributor

The cmake configuration file was exporting the value we give to pybind11 (python 3.7) which is the minimum required. Since this value will be later on taken by an external cmake project as a strict version requirement, it will probably fail.

In a nutshell, the problem was:

  1. cmake search for 3.7 -> finds 3.9 OK
  2. Compilation of SP3 is done using 3.9
  3. SofaPython3Config.cmake is exported with a python 3.7 requirement
  4. External project is now required to use python 3.7, even tho SP3 was compiled using 3.9

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>
@fredroy fredroy merged commit 988336e into sofa-framework:master Feb 24, 2021
@jnbrunet jnbrunet deleted the fix_cmake_export_of_python_version branch February 24, 2021 08:30
jnbrunet added a commit that referenced this pull request Feb 24, 2021
Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>
fredroy pushed a commit that referenced this pull request Aug 27, 2021
* Clean-ups before release (#82)

* Clean-ups before release

* Swap the cmake dependent option SP3_LINK_TO_USER_SITE to a regular cmake option.

* Missing SofaBaseLinearSolver in RestShapeForcefied test

* Improve CMake for v20.12 (#83)

* Build SofaPython3 alongside SofaPython

because it's possible.

* Keep only one ON-OFF option: PLUGIN_SOFAPYTHON3

* Use new macros from SofaMacros

* Improve install tree

* [cmake] Fix rpaths for both in-tree and out-of-tree

* [cmake] Use a global cmake variable to set the RPath to all targets under the bindings directory

Co-authored-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [cmake] Fix rpath for MacOS on SOFA relocatable dependencies

* [cmake] Fix rpath for MacOS on SOFA relocatable dependencies (part 2)

* [examples] Add an advanced timer scene demonstration (#84)

* Update license before the release (#85)

* [CMake] Re-enable building SofaPython3 alongside SofaPython

* Rename contributors.txt to Authors.txt

(cherry picked from commit 475250a)

* Add badges for Doc and License (#89)

(cherry picked from commit 1b675c8)

* Update examples 202101 (#86)

* Add example to load XML file from python environment

* Update scenes with pluginization

* Missing plugin SofaOpenglVisual in scenes

(cherry picked from commit e496cb1)

* Fix institutions (#88)

(cherry picked from commit e75afab)

* [cmake] Fix compilation issue on MacOS (#90)

* Added a binding for getLookAtFromOrientation. (#91)

* [cmake] Export SP3 cmake tools for usage in external projects (#94)

* Wider RPATH for python modules (#95)

* CLEAN SofaPython3Config.cmake.in

* [cmake] Wider RPATH support for python modules

* [CMake] Simplify RPATH (#96)

* [CMake] Simplify RPATH management

* [CMake] Simplify RPATH management (2)

* [CMake] Simplify RPATH management (3)

* [CMake] Handle dep. to other python modules in RPATH

* [CMake] CLEAN SofaPython3Tools.cmake

* [Examples] Fix scenes before the release

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [Examples] Remove the pygame scene as it is broken without glew bindings (#97)

The pygame example is broken and would necessitate to bring back a hard dependency on glew.

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [CMake] FIX SofaPython3Tools inclusion (#99)

* [cmake] Remove RPATH debug message (#101)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [SofaBaseTopology] Fix binding entry point (#103)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [Plugin] Change the initialization order of the Prefab (#105)

* [examples] Remove warning and dep (#107)

* [Plugin] Remove unused files

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [cmake] Fix missing module path for external projects (#104)

* [cmake] Fix missing module path for external projects

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [cmake] Version add a tailing zero to 20.12.0(0)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>
(cherry picked from commit c89affa)

* Add PluginManager callback for sys.path auto-adds

* [Plugin] Improve PluginManager callback for Windows install

* FIX PythonEnvironment use FileSystem::exists

* [SofaGui] Use new qt.conf.h for custom qt.conf loading at runtime

* [Plugin] CLEAN PythonEnvironment messages

* [Bindings] ADD current dir to RPATH

* [Bindings] ADD debug log for qt.conf loading

* [cmake] CMake config was exporting the wrong python version (#116)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [CMake] Disable PYTHON_EXECUTABLE reading

* [CMake] Disable PYTHON_EXECUTABLE reading (2)

* Quickfix compilation

* [GitHub] Update SOFA minimal binaries to v20.12.02

* [SofaGui] FIX qt.conf.h include depends on SofaGuiQt availability

* Fix _setattr__ (#145)

If attribute is not a data or a link, calls the default implementation for setattr. This allows to have properties for custom types defined by a user.

* [CMake] Make SP3_BUILD_TEST a dependent option

* [CMake] CLEAN SofaPython3Config.cmake.in

* [Plugin] Remove noisy "No python3 dir found" message

* [GitHub] Use master version of SOFA

(will be set to v21.06 after PR is merged)

Co-authored-by: Jean-Nicolas <jnbrunet2000@gmail.com>
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Paul Scheikl <paul.scheikl@kit.edu>
Co-authored-by: Juan José Casafranca <juan.casafranca@kdab.com>
guparan added a commit that referenced this pull request Aug 27, 2021
* Clean-ups before release (#82)

* Clean-ups before release

* Swap the cmake dependent option SP3_LINK_TO_USER_SITE to a regular cmake option.

* Missing SofaBaseLinearSolver in RestShapeForcefied test

* Improve CMake for v20.12 (#83)

* Build SofaPython3 alongside SofaPython

because it's possible.

* Keep only one ON-OFF option: PLUGIN_SOFAPYTHON3

* Use new macros from SofaMacros

* Improve install tree

* [cmake] Fix rpaths for both in-tree and out-of-tree

* [cmake] Use a global cmake variable to set the RPath to all targets under the bindings directory

Co-authored-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [cmake] Fix rpath for MacOS on SOFA relocatable dependencies

* [cmake] Fix rpath for MacOS on SOFA relocatable dependencies (part 2)

* [examples] Add an advanced timer scene demonstration (#84)

* Update license before the release (#85)

* [CMake] Re-enable building SofaPython3 alongside SofaPython

* Rename contributors.txt to Authors.txt

(cherry picked from commit 475250a)

* Add badges for Doc and License (#89)

(cherry picked from commit 1b675c8)

* Update examples 202101 (#86)

* Add example to load XML file from python environment

* Update scenes with pluginization

* Missing plugin SofaOpenglVisual in scenes

(cherry picked from commit e496cb1)

* Fix institutions (#88)

(cherry picked from commit e75afab)

* [cmake] Fix compilation issue on MacOS (#90)

* Added a binding for getLookAtFromOrientation. (#91)

* [cmake] Export SP3 cmake tools for usage in external projects (#94)

* Wider RPATH for python modules (#95)

* CLEAN SofaPython3Config.cmake.in

* [cmake] Wider RPATH support for python modules

* [CMake] Simplify RPATH (#96)

* [CMake] Simplify RPATH management

* [CMake] Simplify RPATH management (2)

* [CMake] Simplify RPATH management (3)

* [CMake] Handle dep. to other python modules in RPATH

* [CMake] CLEAN SofaPython3Tools.cmake

* [Examples] Fix scenes before the release

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [Examples] Remove the pygame scene as it is broken without glew bindings (#97)

The pygame example is broken and would necessitate to bring back a hard dependency on glew.

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [CMake] FIX SofaPython3Tools inclusion (#99)

* [cmake] Remove RPATH debug message (#101)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [SofaBaseTopology] Fix binding entry point (#103)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [Plugin] Change the initialization order of the Prefab (#105)

* [examples] Remove warning and dep (#107)

* [Plugin] Remove unused files

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [cmake] Fix missing module path for external projects (#104)

* [cmake] Fix missing module path for external projects

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [cmake] Version add a tailing zero to 20.12.0(0)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>
(cherry picked from commit c89affa)

* Add PluginManager callback for sys.path auto-adds

* [Plugin] Improve PluginManager callback for Windows install

* FIX PythonEnvironment use FileSystem::exists

* [SofaGui] Use new qt.conf.h for custom qt.conf loading at runtime

* [Plugin] CLEAN PythonEnvironment messages

* [Bindings] ADD current dir to RPATH

* [Bindings] ADD debug log for qt.conf loading

* [cmake] CMake config was exporting the wrong python version (#116)

Signed-off-by: Jean-Nicolas Brunet <jnbrunet2000@gmail.com>

* [CMake] Disable PYTHON_EXECUTABLE reading

* [CMake] Disable PYTHON_EXECUTABLE reading (2)

* Quickfix compilation

* [GitHub] Update SOFA minimal binaries to v20.12.02

* [SofaGui] FIX qt.conf.h include depends on SofaGuiQt availability

* Fix _setattr__ (#145)

If attribute is not a data or a link, calls the default implementation for setattr. This allows to have properties for custom types defined by a user.

* [CMake] Make SP3_BUILD_TEST a dependent option

* [CMake] CLEAN SofaPython3Config.cmake.in

* [Plugin] Remove noisy "No python3 dir found" message

* [GitHub] Use master version of SOFA

(will be set to v21.06 after PR is merged)

Co-authored-by: Jean-Nicolas <jnbrunet2000@gmail.com>
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Paul Scheikl <paul.scheikl@kit.edu>
Co-authored-by: Juan José Casafranca <juan.casafranca@kdab.com>

# Conflicts:
#	CMakeLists.txt
#	bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Timer/Submodule_Timer.cpp
@guparan guparan added this to the v21.06 milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants