-
Notifications
You must be signed in to change notification settings - Fork 39
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
Spyder.app fails with setuptools 61.0.0 #414
Comments
Hmmm, that's weird. While debugging another problem using a venv containing the Spyder dependencies I noticed that the resulting app contains a lot of code that shouldn't have been included, that might explain the last item on your list. I haven't debugged yet why this happens. |
The issue I mentioned earlier is likely unrelated, the problem there is that PIL by way of numpy pulls in a lot of dependencies when those are present. That's not a problem for Spyder because it actually uses those dependencies. |
I fixed a related issue in the repository, the Qt5 recipe resulted in a duplicate copy of parts of PyQ5 when using the wheel on PyPI. I haven't checked yet how this fix affects Spyder. |
A workaround for the lowercase name of the app is to include a name argument in the call to setup(), that is:
For some reason in setuptools 61.0 the This is an explicit change in setuptools: pypa/setuptools#2894, which is one of the changes in setuptools 61.0. This is something I cannot work around in py2app, by the time my code gets run the damage is already done. A workaround for this: add an empty py_modules argument to the call to setup: |
I'll give those a try and report back. |
I've filed pypa/setuptools#3248 about the auto discovery problem. |
Using |
This introduces a ``setuptools.finalize_distribution_options`` that sets the *name* and *py_modules* attributes of the distribution in a way that is compatible with py2app's regular calculation of these attributes. This avoid problems with setuptools 61.0.0 or later that use autodiscovery to set these attributes to values that may not be compatible with py2app. Issue #414
The next release of py2app should work out of the box with these versions of setuptools. |
@mrclary Is the problem with duplication of code in the generated app bundle still present? |
I'll verify, standby... |
On my machine the app bundle looks correct, no duplicate spider. BTW. The Readme.md in installers/macOS appears to be out of date. The instruction for installing dependencies contains: pip install -r req-build.txt -r req-extras.txt -c req-const.txt -e ../../
|
Looks good on my local machine as well. It works even without
Indeed. Thanks for reminding me 😄 . |
Great. I'll push out a new release over the weekend. Specifying py_modules or name should no longer be necessary, I'm using a setuptools entrypoint to do this automatically. |
The latest release of
setuptools
61.0.0 breaks the app bundle for Spyder .See spyder-ide/spyder#17551.
Bundle creation works for setuptools 60.10.0
The observed symptoms are:
spyder
source code should be included outside the zip (using thepackages
directive), however now it is included in the zip directory as well (two locations).The text was updated successfully, but these errors were encountered: