Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SofaPython] Regroup dependencies #1875

Merged

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Mar 1, 2021

SofaPython was needed into SofaTest (to enable python test) and SofaExporter for bindings.

1- then CMake had to enable SofaPython then SofaTest then SofaPython/SofaPython_test, which is quite "bothersome",and made the main SOFA Cmakefile cluttered.
Now if SofaTest is enabled, SofaPython will enable the use of Python_test (and not the other way around)
(NB SofaPython contains a redirection for project including SofaTest/Python_test.h)

2- SofaExporter is a Sofa module and so, it is quite weird to have a dependency to a plugin in a module.
Now SofaPython will enable SofaExporter bindings if SofaExporter has been enabled before (and not the other way around)


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code NG4: remove-plugins See https://github.com/sofa-framework/sofa/issues/1527 labels Mar 1, 2021
@fredroy
Copy link
Contributor Author

fredroy commented Mar 1, 2021

[ci-build][with-all-tests][force-full-build]

find_package(PythonLibs 2.7 REQUIRED)
find_package(SofaGui REQUIRED)
find_package(SofaUserInteraction REQUIRED)
find_package(SofaMiscMapping REQUIRED)
find_package(Eigen3 REQUIRED)

sofa_find_package(SofaTest QUIET)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find_package or sofa_find_package :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sofa_find_package to get the cmake variable SOFAPYTHON_HAVE_SOFATEST defined in the cmake.in, etc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So all the other find_package in every CMakeLists.txt should become sofa_find_package ?

@damienmarchal
Copy link
Contributor

damienmarchal commented Mar 1, 2021

This sounds nice and mandatory...I'm looking how did the inversion of dependencies.

EDIT: ok i saw

@guparan
Copy link
Contributor

guparan commented Mar 1, 2021

I propagated SofaPython dep changes in more plugins.
I also added a few quick-cleans, see my nice commit messages to get the idea 👍

@guparan guparan merged commit 887b1c0 into sofa-framework:master Mar 2, 2021
@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Mar 2, 2021
guparan added a commit to sofa-framework/ci that referenced this pull request Mar 12, 2021
This options affects only Compliant and image since sofa-framework/sofa#1875
@guparan guparan added this to the v21.06 milestone Mar 26, 2021
@fredroy fredroy deleted the move_sofatestpython_to_sofapython branch October 14, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NG4: remove-plugins See https://github.com/sofa-framework/sofa/issues/1527 pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants