-
Notifications
You must be signed in to change notification settings - Fork 440
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
Change Python module build (setup.py / setuptools config) to make it more widely compatible #1137
Change Python module build (setup.py / setuptools config) to make it more widely compatible #1137
Conversation
7d4e583
to
01d1a0e
Compare
Adjusted the workflow configuration to give cibuildwheel a test command to run - this just runs the Unfortunately it seems all the path handling code only expects
(Build action log: https://github.com/johnbartholomew/jsonnet/actions/runs/8087521792/job/22099656631) |
2bde0f3
to
809c206
Compare
I did the naive thing and just added an In GitHub actions the Python test suite now passes on Windows: https://github.com/johnbartholomew/jsonnet/actions/runs/8098334188/job/22131487672
|
0146a18
to
6591d46
Compare
The Makefile is problematic because it needs shell and the `od` command. But Python setuptools is perfectly capable of building some .cpp files on its own, so we can use that, it just needs a minor extension to generate core/std.jsonnet.h. Also update MANIFEST.in after the recent changes to third_party: The bundled RapidYAML was switched to the single-header version, and nlohmann json.hpp was moved to a subdirectory.
6591d46
to
cb18fec
Compare
This moves us toward a Windows & MSVC-compatible Python module build, and should obsolete #784, and move toward a resolution for #734.
Py_ssize_t
instead ofssize_t
, for compatibility with some MSVC version(s) that don't havessize_t
available.python/_jsonnet_test.py
for each build as a smoke test.Things not in this PR:
Is it tested? Kinda. I don't have a Windows machine to test on, so I'm relying on the GitHub workflow to build & run the Python test.