Skip to content

TST: simplify source path names in compilation test#17658

Merged
charris merged 2 commits intonumpy:masterfrom
mattip:simplify
Oct 28, 2020
Merged

TST: simplify source path names in compilation test#17658
charris merged 2 commits intonumpy:masterfrom
mattip:simplify

Conversation

@mattip
Copy link
Copy Markdown
Member

@mattip mattip commented Oct 27, 2020

In distutils/_msvccompiler.object_filenames, the source's filename is repeated into the temp directory, so if the source file is a/b/c/d/e/f/source.c that whole hierarchy will be repeated into temp-platformname, unless the strip_dir argument is not False. When we run the tests, the starting directory is already quite long on windows, it might be something like C:\Users\VssAdministrator\AppData\Local\Temp\pytest-of-VssAdministrator\pytest-0\test_cython0\random\_examples\cython, so the final output directory is C:\Users\VssAdministrator\AppData\Local\Temp\pytest-of-VssAdministrator\pytest-0\test_cython0\random\_examples\cython\build\temp.win-amd64-3.9\Release\Users\VssAdministrator\AppData\Local\Temp\pytest-of-VssAdministrator\pytest-0\test_cython0\random\_examples\cython.

I think this is too long for windows to handle. I propose to shorten the source file name, so it will not include the full path.

@mattip
Copy link
Copy Markdown
Member Author

mattip commented Oct 27, 2020

xref failing 3.9 builds MacPython/numpy-wheels#101

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Oct 28, 2020
@charris
Copy link
Copy Markdown
Member

charris commented Oct 28, 2020

I added a Python 3.9 build to Windows so that we can see if this works.

@charris
Copy link
Copy Markdown
Member

charris commented Oct 28, 2020

That works, so putting this in, travisCI is still missing the fjords. Thanks Matti.

@charris charris merged commit 9563a3a into numpy:master Oct 28, 2020
@charris charris added component: numpy.random and removed 09 - Backport-Candidate PRs tagged should be backported labels Oct 28, 2020
@mattip mattip deleted the simplify branch April 8, 2021 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants