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

Add identifiable Python include directory name for Python wrappers #3608

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

schnellerhase
Copy link
Contributor

@schnellerhase schnellerhase commented Jan 29, 2025

Currently the python module installs the header files into the (include) path python/dolfinx/wrappers, which is then accessible through dolfinx.get_include.

This however drops the necessity/option of a name giving include path for dolfinx extension modules. For example the array.h file of the dolfinx wrappers is then included in a third party lib as <array.h> obscuring its origin. This can be for example seen in action in dolfinx_mpc and multiphenicsx .

This PR introduces an additional sub directory dolfinx_wrappers for the installed headers, so the new include for the pyhton wrapper headers adds the descriptive additional prefix <dolfinx_wrappers/...>.

Also, removes file python/dolfinx/wrappers/__init__.py, which is superseded by python/dolfinx/__init__.py::get_include, and moves py_to_cpp_coeffs into the dolfinx_wrappers namespace (previously in global scope).

@schnellerhase schnellerhase marked this pull request as ready for review January 29, 2025 22:25
@schnellerhase schnellerhase force-pushed the python_package_include_dir branch from a782217 to 795eba0 Compare January 31, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant