-
Notifications
You must be signed in to change notification settings - Fork 11
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
Build Python wheels #159
Build Python wheels #159
Conversation
These changes look good. Give me a little time to try running a test within the |
don't build or install C++ shared libraries, header files, and cmake config files
Ok I've rearranged a bit so that the bits that are specific to the GitHub runner just check the CIBUILDHWEEL environment variable, and otherwise the python build assembles everything that the cmake one did. I've also tried to make the cmake version handling a bit smoother. |
9c8cf93
to
32c9be4
Compare
Only link executables against libpython, and ensure libraries use dynamic lookup on all platforms
ae5bc06
to
8ab46b4
Compare
The runner now handles linux and macOS wheels identically, not building any executables that require linking against libpython, and linking all shared libraries and modules against the |
8bbc639
to
d5596c4
Compare
1be12d0
to
5050cbc
Compare
5050cbc
to
fac02c0
Compare
fa25018
to
2f6aa91
Compare
2f6aa91
to
49c17b9
Compare
I've split off the library rearranging bits into a separate PR #163 to make this one a bit less of a monster. |
This PR rearranges this code to facilitate building and installing the
spt3g
python package with standard python tools likepip
andbuild
.The shared libraries, headers, and cmake configuration files are installed relative to
CMAKE_INSTALL_PREFIX
as usual. Thepip
installer handles versioning, and passes appropriate cmake definitions to the cmake builder that compiles all of the libraries and modules, then installs the python package into the appropriate location, and triggers the cmake installer.The
pip
installer can also be run in an--editable
mode that works much like the cmake build directory, enabling code development without the need to make changes to various path environment variables. It also should install all of the components into appropriate locations when run in a virtual environment.Versioning is done using
setuptools_scm
with thepip
build system, or with a custom shell script with thecmake
build system. In both cases, the version information is determined by running a series ofgit
commands or by parsing the.git_archival.txt
file, then output tospt3g/version.py
for access in the Python package and to theSPT3G_VERSION
preprocessor directive for access in C++.Finally, this PR includes a github workflow for producing pre-compiled wheels for Linux and OSX platforms.