-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setuptools.windows_support requires ctypes support even on non-Windows #2234
Comments
Thanks for the report. That does sound like an inconvenience. On one hand, this sounds like a defect lies with Python and will be fixed in Python. Indeed, this issue could be worked around by Given that this issue is only affecting a non-final release and is likely to be fixed before that final release, I'm tempted to say a temporary workaround should be preferable to editing the setuptools source. What do you think? Should Setuptools adjust for this temporarily degraded state? |
My particular case is just an inconvenience that I worked around by patching setuptools. Is ctypes essential enough to have a hard dependency on it regardless of the platform? I'd expect that all major platforms are supported by libffi and hence ctypes, but there may be obscure platforms that run Python without providing ctypes. The hard dependency can be avoided by moving the import inside setuptools.windows_support.hidden_file. I don't have a strong opinion either way. |
Not really. Surely the import could be made late, and already the import for If on the other hand, Python were to document that |
Pretty sure this was fixed by #3178 |
The module
setuptools.windows_support
unconditionally imports "ctypes", even though this module is only used when running on a Windows machine. The result of this is that setuptools is unusable on systems without ctypes (in my case because I'm running macOS on arm64 where the patches needed to get ctypes support haven't been merged yet).Environment Details
Command(s) that triggered the warning/error (and output):
Command(s) used to install setuptools (and output): Setuptools was installed when building python "make install".
Versions:
The text was updated successfully, but these errors were encountered: