-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Relative include path of generated frozen module in getpath.c #113039
Comments
I'd rather refer to it as just I'm not sure where the relative path came from, but I don't like it. I'm also not a huge fan of generated files going back into the source tree (I prefer them in |
+1 to all you said, but especially this part. We should create an issue for this (unless there already is one). |
completely agree about the source tree. on Linux it seems this is already the case (in OOT builds, the frozen headers go in the build tree).
I think I'd prefer seeing the full path there -- seeing just in any case, I was able to cheat and get CI on gh-113022 passing by keeping the relative include only on Windows. |
figured out |
It's already the default - build files go into
Because it's still going to be relative to an implied include dir, it's just going to make it harder to guess which one because the file is so much further away from any of the directories. Adding the comment is fine. You can give a better explanation that way. |
The PR was fine though, so I merged it. If you want to do more work to avoid writing files back into the source tree at build time, feel free, but I didn't see any reason to hold up that first change. |
Feature or enhancement
Proposal:
in
getpath.c
, the generated frozengetpath.h
is [included using relative path](cpython/Modules/getpath.c
Line 25 in c6e614f
I'd like to consider changing this to use absolute include path.
my primary motivation is to make it possible to build python using alternative build systems (buck2 in my case), where frozen modules are generated as intermediate build artifacts, and it's not straight forward (read: I couldn't figure it out yet) to make the generated header "look like" it's in that relative path.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: