-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[2492] Add new page to document installation methods #3941
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,46 @@ | ||||||||||||||||||
# Ways to install Black | ||||||||||||||||||
|
||||||||||||||||||
There are several ways you can install _Black_. | ||||||||||||||||||
|
||||||||||||||||||
## Install from PyPI | ||||||||||||||||||
|
||||||||||||||||||
To install the latest release of _Black_ from [PyPI] (Requires Python 3.8+), use: | ||||||||||||||||||
|
||||||||||||||||||
`pip install black` | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. O - Just thought of it - Please talk about all black's optional installs in this section too, please. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added, please check! |
||||||||||||||||||
|
||||||||||||||||||
A _Black_ release currently offers three types of artifacts via PyPI, as outlined in the | ||||||||||||||||||
[Release Process]: | ||||||||||||||||||
|
||||||||||||||||||
1. The source distribution of the release | ||||||||||||||||||
2. Generic Python wheel, meant for use on any Python supported platform | ||||||||||||||||||
3. Platform and Python version specific wheels that offer significantly improved | ||||||||||||||||||
performance, compiled using [mypyc] | ||||||||||||||||||
|
||||||||||||||||||
By default, `pip` will prefer a compatible wheel and revert to the source distribution | ||||||||||||||||||
if no such wheels are found, as outlined in [Python documentation]. | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Did you forget the link? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The links were all declared at the end of the page, similar to other pages in the documentation. I've changed all of them to avoid confusion. |
||||||||||||||||||
|
||||||||||||||||||
## Install from GitHub | ||||||||||||||||||
|
||||||||||||||||||
To install the latest version of _Black_ from GitHub, use: | ||||||||||||||||||
|
||||||||||||||||||
`pip install git+https://github.com/psf/black` | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||
|
||||||||||||||||||
## Get native binaries from GitHub | ||||||||||||||||||
|
||||||||||||||||||
[GitHub Releases] for _Black_ contain self-contained, native binaries for multiple | ||||||||||||||||||
platforms (built using PyInstaller). This allows you to download the executable for your | ||||||||||||||||||
platform and run _Black_ without a Python runtime installed. | ||||||||||||||||||
|
||||||||||||||||||
## Black Docker images | ||||||||||||||||||
|
||||||||||||||||||
Official _Black_ Docker images are available on [Docker Hub]. For more information, | ||||||||||||||||||
check the [Black Docker image] section. | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Command example optional but I think we should fix the link to make this page more useful. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left out the command example because it's already present in the Black Docker page, can add it if required. |
||||||||||||||||||
|
||||||||||||||||||
[PyPI]: https://pypi.org/project/black/ | ||||||||||||||||||
[Release Process]: ./../contributing/release_process | ||||||||||||||||||
[mypyc]: https://mypyc.readthedocs.io/ | ||||||||||||||||||
[Python documentation]: | ||||||||||||||||||
https://packaging.python.org/en/latest/tutorials/installing-packages/#source-distributions-vs-wheels | ||||||||||||||||||
[GitHub Releases]: https://github.com/psf/black/releases | ||||||||||||||||||
[Docker Hub]: https://hub.docker.com/r/pyfound/black | ||||||||||||||||||
[Black Docker image]: ./black_docker_image |
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.
I wonder if we can link to the pyproject.toml directive here to avoid having yet another place to upgrade when we move to requiring >= 3.9 - All for ideas here but can live with it if it's to hard ...
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.
I'm checking if this can be done via tomli and Sphinx configuration somehow.