-
Notifications
You must be signed in to change notification settings - Fork 36
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
Bundling recent "black" fails #476
Comments
It seems that "top_level.txt" is not a required file, but is always added by setuptools. This is not the case with other packaging tools like Hatch (as used by Black). |
Info found here: https://blog.schuetze.link/2018/07/21/a-dive-into-packaging-native-python-extensions.html
|
Ah, interesting! a1c0a2c |
Maybe tangentially, running
Somehow black's dependencies aren't completely picked up by py2app. |
Black uses mypyc and that makes it annoying hard to automatically bundle it up. Last time I worked on this just adding "black" to the packages option wasn't good enough, mypyc adds a helper extension outside of the package. I'll see if I can update the recipe for this. |
Issue #476. This should fix two problems with the recipe: 1. The older recipe uses "toplevel.txt", which is not present in current wheels of black, and is not part of a modern packaging standard. The new version uses "RECORD" instead. 2. Use code borrowed from modudulegraph to scan the source code next to the mypyc compiled extension modules for depedencies. This automaticly detects dependencies instead of relying on a hardcoded list in the recipe.
End of year vacation time for the win... Could you check if the head of the "v0.28-branch" branch fixes the issue for this? Don't test the the master branch, that's fairly unstable at the moment and more importantly doesn't include the fix I pushed earlier. |
Fantastic, works like a charm with black 22.12.0. Thank you so much! |
Great, I'll push out a release later this week. |
thanks Ronald! |
a py2app with this fix was released yesterday. |
FWIW, while I see the release on PyPI, it is not listed on the GH releases page: https://github.com/ronaldoussoren/py2app/releases |
Running
python setup.py py2app
in the attached archived folder fails like this:This is happening since
black==22.10.0
Here is a minimal reproducer:
app_with_black.zip
Now, this may of course be a bug in black: psf/black#3233 (comment), but thought it good to report here, too.Cc @typemytype
The text was updated successfully, but these errors were encountered: