-
Notifications
You must be signed in to change notification settings - Fork 3
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
RFC: Include python3.def itself in the Rust source #10
Conversation
40a926a
to
25aac2c
Compare
I agree with this change in principle, but I'd like to see at least some test coverage to ensure that the number of Stable ABI exports is non-decreasing with each definitions update PR. The Rust version had something like that. You should also update |
25aac2c
to
3cdcd76
Compare
Added this as an
Done. |
Also note that the automatically created PR will contain a diff of the generated definitions file this way, so we can also review that before merging. |
The switch to TOML will happen today or early next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
All parsing and processing is done in the CI so that the crate itself includes the python3.def file itself instead of creating it on the fly.
3cdcd76
to
efc4213
Compare
Thanks for the heads-up! I think we could do |
Thanks for updating us on this. I'll delay the merge until the update script migrates to the TOML source. |
CPython just switched to TOML. If you stick with Python for parsing, beware that If you happen to know another project that needs a |
Does this mean that |
Yes. CPython has some infrastructure to generate files based on Python generates and uses python3dll.c instead. (Hm, would you be able to use that by any chance? I know next to nothing about building on Windows...) |
No, I think it's specific to the Microsoft C++ compiler, and we also support MinGW and LLVM tools (without Clang). Also we only need the import library, not the DLL file itself. |
f0b80b4
to
358824a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
I think we can merge this now (?). I'll wait for @messense to take a look. |
358824a
to
131f4bf
Compare
Had to switch to installing |
TBH I was surprised that Ubuntu had up to date Python packages, but I'm mostly using official Rust docker images based on Debian Buster, so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
All parsing and processing is done in the CI so that the crate itself includes the python3.def file itself instead of creating it on the fly.
Based on the idea voiced in #9 (comment)
I did try to keep the existing semantics in place and just moved things around to a Python script running in the CI. I just chose Python because I assume that the
ubuntu-latest
image contains a reasonably up-to-date version. (The updated CI workflow is untested, but I used the script locally the produce the definition file committed here.)One could try using the upstream script to do the parsing and generating, but I think that should be evaluated separately.