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
pyximport: cd into common dir to prevent too-long filenames for windows #4630
Conversation
Only the codestyle CI run failed, which I don't think is connected to this PR. |
Thanks, but I wouldn't change much in pyximport right now while #4560 is coming up. At least, this doesn't break the |
The code style test says |
Right, this will cause a conflict with #4625, so waiting is prudent. The split between pre- and post-python3.5 there will allow the newer version to use |
The related PRs are stalled. Perhaps this could get merged first? That would move pypy/binary-testing#13 forward. |
I was wondering if this breaks finding the .c file from the profiler, but I don't even know if profiling worked at all before when the .c file was put away into some randomly far away temporary directory. Probably not… However, I think it would be nicer if we could shorten the long path in general, e.g. by stripping things like the user home directory and the current directory. Or by replacing the directory part or even the complete file path with a hash of that path. If pyximport controls the target directory, a hash replacement seems just fine. |
I will try this |
Unfortunately |
That is the strategy I use here. I find the common directory, and |
CI is passing |
Good, it's definitely a step further, although there are some more errors, but those seems more tame. |
Any more thoughts here? |
Thanks for the review. CI is passing. |
I considered constraining this to Windows (since it's really a Windows-only problem), but … let's keep it general and see if it actually causes problems that way. I think having shorter path names is a virtue, in case users have to look them up. |
Thanks @mattip |
makes pyximport tests work on windows, part of #4324.
The idea is to cd into the common directory while compiling. Would it be better to do this in
pyx_to_dll
just before creating theext
?