-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update setup.py for setuptools 65 #2216
Conversation
setuptools complains loudly if distutils is also used, and exits with error in the 'docs' step since distutils.core.Command rather than setuptools.Command was used for that step.
Similar to #2214 the error occurs at start up:
|
@wpotrzebowski, no, that's #2222 and unrelated to this PR. The solution is to either upgrade setuptools or upgrade matplotlib (or both). |
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.
Works fine with newest setuptools.
python setup.py docs
run fine now (failing later with unrelated error).
Sorry if this naive question but shouldn't package upgrade package be done as a part of this PR (by modyfing GH actions yml files)? |
Not a naive question at all! This patch is needed for setuptools ≥ 65 but does not require setuptools ≥ 65. This patch is compatible with setuptools from a decade-ish ago, so it can go in now as a preparatory patch to save future failures (such as the ones we already have in Debian/Ubuntu where we have setuptools 65.3). Since this patch is about ensuring broad compatibility with lots of different versions of setuptools, there's no need in this PR to force any particular version of setuptools. The error you reported is not an error with this patch but rather an existing bug with the particular combination of numba/setuptools/matpotlib/pyinstaller that sasview is forcing. That's described in lots more detail in the bug report #2222 and fixing that is a separate PR. That PR doesn't exist yet (and so all the windows installers remain broken…) because there needs to be an agreed approach first. My approach to fixing #2222 would be to remove the constraint on the old and unsupported matplotlib 2.2.5 and switch to something that is then supported by pyinstaller and doesn't interact badly with setuptools. Updating to a newer matplotlib will undoubtedly result in new bugs appearing and so those need to be found and fixed. That bugfixing needs to happen eventually and now is a reasonable time to do it since we're reasonably early in the development cycle for the next release. |
@llimeht thank you for the explanation! It seems that currently most of PRs artifacts (tested installers on Mac) are affected by this issue and therefore cannot be properly tested. I agree we need to fix it properly and it is good time to do it now. |
Closing because changes were part of #2233 |
setuptools
complains loudly ifdistutils
is also used, and exits with error in the 'docs' step sincedistutils.core.Command
rather thansetuptools.Command
was used for that step:This patch is a minimalist "keep it working" effort. Alternatively, all the doc-building could be ripped out of
setup.py
, noting that CI does not use it but callsbuild_sphinx.py
directly. (And a long term goal ofsetup.py
with a PEP517 build configuration remains.)