-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Blackd Packaging #1688
Comments
Does anyone have suggestions here? I’m trying to read docs on how to do this and not finding many answers. I’ll keep digging. We do have ‘[d]’ in the console_scripts entry ... |
I'm fairly sure this used to work as described in the docs. Has something changed in or around |
From the python packaging guide:
It's unclear to me what this different model is, but we should probably use that. |
I did see this too, but I can't work out what it is. I'll call in favors from friends to try work this out. |
That was added to the guide in pypa/packaging.python.org#390. I've not read through it, but it also adds an "entry points specification", perhaps there's something useful in there? Could also ask someone from that PR? |
- If no aiohttp* deps exist nicely print a helpful message and exit - There seems to be no nice way to optionally install the entry point, so lets make the entry point nicer Test: ``` cooper-mbp1:black cooper$ /tmp/tb/bin/pip install . cooper-mbp1:black cooper$ /tmp/tb/bin/blackd aiohttp dependency is not installed: No module named 'aiohttp'. Please re-install black with the '[d]' extra install to obtain aiohttp_cors: `pip install black[d]` cooper-mbp1:black cooper$ /tmp/tb/bin/pip install .[d] ... Successfully installed aiohttp-3.6.3 aiohttp-cors-0.7.0 black cooper-mbp1:black cooper$ /tmp/tb/bin/blackd blackd version 20.8b2.dev31+gdd2f86a.d20201013 listening on localhost port 45484 ``` Fixes #1688
- If no aiohttp* deps exist nicely print a helpful message and exit - There seems to be no nice way to optionally install the entry point, so lets make the entry point nicer Test: ``` cooper-mbp1:black cooper$ /tmp/tb/bin/pip install . cooper-mbp1:black cooper$ /tmp/tb/bin/blackd aiohttp dependency is not installed: No module named 'aiohttp'. Please re-install black with the '[d]' extra install to obtain aiohttp_cors: `pip install black[d]` cooper-mbp1:black cooper$ /tmp/tb/bin/pip install .[d] ... Successfully installed aiohttp-3.6.3 aiohttp-cors-0.7.0 black cooper-mbp1:black cooper$ /tmp/tb/bin/blackd blackd version 20.8b2.dev31+gdd2f86a.d20201013 listening on localhost port 45484 ``` Fixes #1688
- If no aiohttp* deps exist nicely print a helpful message and exit - There seems to be no nice way to optionally install the entry point, so lets make the entry point nicer Test: ``` cooper-mbp1:black cooper$ /tmp/tb/bin/pip install . cooper-mbp1:black cooper$ /tmp/tb/bin/blackd aiohttp dependency is not installed: No module named 'aiohttp'. Please re-install black with the '[d]' extra install to obtain aiohttp_cors: `pip install black[d]` cooper-mbp1:black cooper$ /tmp/tb/bin/pip install .[d] ... Successfully installed aiohttp-3.6.3 aiohttp-cors-0.7.0 black cooper-mbp1:black cooper$ /tmp/tb/bin/blackd blackd version 20.8b2.dev31+gdd2f86a.d20201013 listening on localhost port 45484 ``` Fixes psf#1688
The fix for #1688 in #1761 breaks help("modules") introspection and also leads to unhappy results when inadvertently importing blackd from Python. Basically the sys.exit(-1) causes the whole Python REPL to exit -- not great to suffice. Commit history before merge: * Change sys.exit to Raise. * Add #2440 to changelog. * Fix lint error from prettier * Remove exception chain for more helpful user message. Co-authored-by: Richard Si <[email protected]>
Describe the bug
The blackd documenation states:
But
blackd
is included in packages for black.To Reproduce Steps to reproduce the behavior:
Expected behavior
No binary named
blackd
is installed because its webserver dependencies are not installed.Environment (please complete the following information):
Does this bug also happen on master?
Yes, see above
The text was updated successfully, but these errors were encountered: