mdavidsaver / setuptools_dso

setuptools extension for building non-Python Dynamic Shared Objects
Other
9 stars 6 forks source link

`The filename or extension is too long` when probing #23

Open mdavidsaver opened 1 year ago

mdavidsaver commented 1 year ago

Windows PVXS jobs for python 3.7+ have begun failing with FileNotFoundError: [WinError 206] The filename or extension is too long. A glance at a log suggests that this is triggered by passing a ludicrously long argument list to cl.exe. It seems like each compile() is appending a complete set of msvc include paths. So the first invocation has the list once, the second twice, the third repeats the list three times, and so on.

The Linux and OSX jobs don't show this. Neither do the MSVC jobs for py 3.5 and 3.6.

Maybe the consequence of a setuptools change?

mdavidsaver commented 1 year ago

This issue is triggered when ProbeToolchain() is used from within a setuptools Command (eg. the 'example/'), but not by my test_probe.py.

Further, it is something which effects a ProbeToolchain() instance create in setup.py before setup() is called.

Recent setuptools has added a CCompiler.include_dirs list as a class attribute. https://github.com/pypa/setuptools/commit/9f9a3e57643cb49796c1b08b5b5afb2826ecd7f6

mdavidsaver commented 1 year ago

Reported as https://github.com/pypa/setuptools/issues/3591