Repository navigation
build(python): build platform wheels that carry the native library - #42
Merged
Merged
Conversation
The cabledyn package was published only as a pure-Python wheel: it loads the CableDyn shared library and runs the standalone driver, but the user had to build or download both separately. This prepares publication on PyPI. A root pyproject.toml (scikit-build-core) builds an sdist of the sources and a platform wheel. CMake builds only the cabledyn_shared and cabledyn targets, serially, and under scikit-build installs them through the `python` component: the library beside the package modules, where cabledyn._discovery already looks first, and the driver in cabledyn/bin. The wheel is tagged py3-none-<platform>, since the package reaches the library through ctypes. The sdist leaves out the validation records, the manual, the OpenFAST integration and the release tooling, and builds a wheel on its own. The driver search takes the bundled driver after CABLEDYN_DRIVER and before PATH, under either toolchain name (CableDyn_driver, cabledyn). python/pyproject.toml stays the pure package for development against a build tree; tests/test_packaging_metadata.py keeps the two [project] tables identical except for the readme, licence files and platform classifiers, and the release checks cover the new file. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Owner
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
6 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First step towards publishing
cabledynon PyPI (and conda-forge).The problem. The package was published only as a pure-Python wheel. It loads the CableDyn shared library and runs the standalone driver, but users had to build or download both separately.
What changes:
pyproject.toml(scikit-build-core) builds the published distribution:cabledyn._discoveryalready looks first) and the standalone driver incabledyn/bin;cabledyn_sharedandcabledyntargets, installed through apythoninstall component that is active only under scikit-build; no test programs, and no OpenMP (CABLEDYN_ENABLE_OPENMPoff, like the release executables);py3-none-<platform>; the package reaches the library throughctypes, so one wheel per platform serves every supported Python version;CABLEDYN_DRIVERand beforePATH. It accepts either toolchain's name (CableDyn_driverfor MSVC-style linkers,cabledynfor GNU).python/pyproject.tomlremains the pure package for development against a build tree.tests/test_packaging_metadata.pykeeps the two[project]tables identical, except for the readme, the licence files (the wheel also shipsNOTICE) and the platform classifiers.release/check_release_metadata.pyandrelease/audit_release_tree.pycover the new file.DEVELOPMENT.mddocuments local sdist and wheel builds; CHANGELOG entry.Next PRs:
Verification (local, Windows, conda GNU toolchain)
pip wheel .givescabledyn-…-win_amd64.whlcontainingcabledyn/libcabledyn.dllandcabledyn/bin/cabledyn.exe. Installed into a fresh virtual environment and used from outside the repository, the package:examples/dynamic_chain_current.dat.python -m build --sdistproduces 523 entries with no bytecode, and a wheel builds from the sdist alone.PATH,CABLEDYN_DRIVERbefore bundled), both driver names, and the metadata parity;pre-commit run --all-filesand the Sphinx build with-Wpass.Checklist
pre-commit run --all-filespassesctest --test-dir build --output-on-failurepassespython -m pytest tests python/testspasses (if Python or validation records changed)[Unreleased](heading added if missing) for user-visible changesdoc/updated for changed inputs, options, or outputs (the user-facing install instructions change with the first PyPI release)feat:,fix:,docs:, ...)git commit -s) under theDeveloper Certificate of Origin