-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Make cython generated files less nested to avoid MAX_PATH issues on Windows
#15219
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
base: master
Are you sure you want to change the base?
Conversation
|
It looks like adding |
mesonbuild/backend/ninjabackend.py
Outdated
| output = os.path.join(self.get_target_private_dir(target), f'{src}.{ext}') | ||
| # Use basename to avoid too nested targets which can cause a | ||
| # problem with MAX_PATH on Windows | ||
| basename = src.fname |
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.
fname can have path seperators, it's the path relative to the directory that the File object is defined in, so if the src is files('foo/bar/x.pyx'), then fname will reflect that.
|
I think the failing test is because Cython should probably espace spaces in paths inside dependency files, see #15227. I'll try to think of a simpler way to write the test for this PR. |
|
I tackled #15219 (review) and the case of having I ended up creating a separate test in |
|
Now all the GHA CIs pass but two Azure Windows CIs fail, I need to take a closer look: One of the failure seems to be a ninja error The other one is a |
Fix #15123.
Followed #15123 (comment) which recommends to special-case Cython.
.pyxfile.pyxfile.pyx.cis directly under the.pfolder (something likefoo.cpython-313-x86_64-linux-gnu.so.pon Linux)pyx.ctest cases/cython/2 generated sources/libdir/foo.pyxto test one of the code pathI double-checked it seems to work fine with scikit-learn before our work-arounds to use a generator.