Skip to content
New issue

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

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

Already on GitHub? # to your account

Updating the Python module build #866

Merged
merged 12 commits into from
Mar 26, 2023

Conversation

bcoconni
Copy link
Member

This PR is meant to simplify the build of the Python module using CMake. Until this PR, the compilation of the Python module was delegated by the CMake scripts to the setup.py script.

As a consequence setup.py had to address some build configurations that came from the CMake scripts options (dynamic linking and some flags settings) but this usage is beyond the "normal" scope of a setup.py script. This made setup.py more complex than it should have had to be.

This PR decouples the CMake scripts and the setup.py script as far as the Python module compilation is concerned. The script setup.py will still be generated by CMake but CMake will no longer call setup.py. Instead CMake will now uses the CMake command Python3_add_library to build the Python module and the script setup.py will only be used by our CI/CD workflow to build the Python wheels.

This change result in the deletion of 3 files (python/findModuleFileName.py, python/fpectl/fpectl_config.h.in, python/fpectl/setup.py.in) and the removal of approximately 160 lines of build scripts (including the removed files).

@codecov
Copy link

codecov bot commented Mar 25, 2023

Codecov Report

Merging #866 (8a6ebac) into master (8748f38) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #866   +/-   ##
=======================================
  Coverage   23.24%   23.24%           
=======================================
  Files         167      167           
  Lines       19607    19607           
=======================================
  Hits         4557     4557           
  Misses      15050    15050           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bcoconni bcoconni merged commit bac11b1 into JSBSim-Team:master Mar 26, 2023
@bcoconni bcoconni deleted the cmake_python_modules branch March 26, 2023 16:16
bcoconni added a commit to bcoconni/jsbsim that referenced this pull request Apr 8, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant