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

Windows build #819

Merged
merged 111 commits into from
Apr 30, 2024
Merged

Windows build #819

merged 111 commits into from
Apr 30, 2024

Conversation

jhale
Copy link
Member

@jhale jhale commented Apr 28, 2024

Uses vcpkg and currently the split build for debugging. Remaining error related to finding _basixcpp library on Python import. Needs tidying (passing lots of options/environment variables around at the moment). Also would be good to try combined build.

@jhale
Copy link
Member Author

jhale commented Apr 30, 2024

Summary:

  • No hard coded paths in our source.
  • Combined install works without adhoc modifications to $PATH or Python's dll loader's internal concept of the PATH. All dlls (basix, openblas etc). end up in the same directory as the .pyd wrapper. Python's dll loader will search . for all runtime links, and it just works.
  • Split install. vcpkg-provided dlls are put with the C++ library. The Python wrapper sits on its own. C++ runtime linking only succeeds if the C++ libraries are put on the PATH (totally standard). Python runtime linking only succeeds if and the Python DLL loader is told about the C++ runtime directory, which is consistent with the documentation (https://docs.python.org/3/library/os.html#os.add_dll_directory). This is currently done through a conftest.py file to execute the tests.
  • No changes for Unix targets.

The nasty IFs can be removed once RedHat has a newer CMake (>3.21).

This could be tried in conda now @minrk.

@jhale jhale added this pull request to the merge queue Apr 30, 2024
@jhale
Copy link
Member Author

jhale commented Apr 30, 2024

I've merged this with the idea that it will certainly need another iteration once tested in Conda.

Merged via the queue into main with commit baff38a Apr 30, 2024
27 checks passed
@jhale jhale deleted the jhale/windows-build branch April 30, 2024 14:39
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.

3 participants