Skip to content

Commit 3a3ea93

Browse files
authored
Merge branch 'main' into translation-guide
2 parents 69403ff + efece5c commit 3a3ea93

8 files changed

Lines changed: 50 additions & 22 deletions

source/contribute.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ in order to test your changes. In order to build this guide locally, you'll
126126
need:
127127

128128
1. `Nox <https://nox.readthedocs.io/en/latest/>`_. You can install or upgrade
129-
nox using ``pip``::
129+
nox using ``pip``:
130+
131+
.. code-block:: bash
130132
131133
python -m pip install --user nox
132134
@@ -137,19 +139,23 @@ need:
137139
.. _Hitchhiker's Guide to Python installation instructions:
138140
http://docs.python-guide.org/en/latest/starting/installation/
139141

140-
To build the guide, run the following bash command in the source folder::
142+
To build the guide, run the following bash command in the source folder:
143+
144+
.. code-block:: bash
141145
142-
nox -s build
146+
nox -s build
143147
144148
After the process has completed you can find the HTML output in the
145149
``./build/html`` directory. You can open the ``index.html`` file to view the
146150
guide in web browser, but it's recommended to serve the guide using an HTTP
147151
server.
148152

149153
You can build the guide and serve it via an HTTP server using the following
150-
command::
154+
command:
155+
156+
.. code-block:: bash
151157
152-
nox -s preview
158+
nox -s preview
153159
154160
The guide will be browsable via http://localhost:8000.
155161

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,9 @@ both installed and editable in project form.
666666

667667
Assuming you're in the root of your project directory, then run:
668668

669-
::
669+
.. code-block:: bash
670670
671-
python -m pip install -e .
671+
python -m pip install -e .
672672
673673
674674
Although somewhat cryptic, ``-e`` is short for ``--editable``, and ``.`` refers
@@ -698,7 +698,9 @@ Otherwise, the dependency will be fulfilled from PyPI, due to the installation o
698698
<pip:Requirements Files>` section in the pip docs. For more on VCS installs,
699699
see the :ref:`VCS Support <pip:VCS Support>` section of the pip docs.
700700

701-
Lastly, if you don't want to install any dependencies at all, you can run::
701+
Lastly, if you don't want to install any dependencies at all, you can run:
702+
703+
.. code-block:: bash
702704
703705
python -m pip install -e . --no-deps
704706
@@ -880,9 +882,11 @@ distribution file(s) to upload.
880882
directive). **Before** trying to upload your distribution, you should check
881883
to see if your brief / long descriptions provided in :file:`setup.py` are
882884
valid. You can do this by running :std:doc:`twine check <index>` on
883-
your package files::
885+
your package files:
886+
887+
.. code-block:: bash
884888
885-
twine check dist/*
889+
twine check dist/*
886890
887891
Create an account
888892
-----------------

source/guides/dropping-older-python-versions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Within a Python source package (the zip or the tar-gz file you download) is a te
105105
This file is generated by Distutils or :ref:`setuptools` when it generates the source package.
106106
The file contains a set of keys and values, the list of keys is part of the PyPa standard metadata format.
107107

108-
You can see the contents of the generated file like this::
108+
You can see the contents of the generated file like this:
109+
110+
.. code-block:: bash
109111
110112
tar xfO dist/my-package-1.0.0.tar.gz my-package-1.0.0/PKG-INFO
111113

source/guides/index-mirrors-and-caches.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ cached copies of :term:`packages <Distribution Package>`:
3535
those downloaded files instead of going to PyPI.
3636
2. A variation on the above which pre-builds the installation files for
3737
the requirements using `python -m pip wheel
38-
<https://pip.readthedocs.io/en/latest/reference/pip_wheel.html>`_::
38+
<https://pip.readthedocs.io/en/latest/reference/pip_wheel.html>`_:
3939

40-
python -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject
41-
python -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
40+
.. code-block:: bash
41+
42+
python -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject
43+
python -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
4244
4345
4446
Caching with devpi

source/guides/making-a-pypi-friendly-readme.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ You can check your README for markup errors before uploading as follows:
122122
2. Build the sdist and wheel for your project as described under
123123
:ref:`Packaging Your Project`.
124124

125-
3. Run ``twine check`` on the sdist and wheel::
125+
3. Run ``twine check`` on the sdist and wheel:
126126

127-
twine check dist/*
127+
.. code-block:: bash
128+
129+
twine check dist/*
128130
129131
This command will report any problems rendering your README. If your markup
130132
renders fine, the command will output ``Checking distribution FILENAME:

source/guides/using-manifest-in.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ setuptools will automatically convert the slashes to the local platform's
9393
appropriate directory separator.
9494

9595
Commands are processed in the order they appear in the :file:`MANIFEST.in`
96-
file. For example, given the commands::
96+
file. For example, given the commands:
97+
98+
.. code-block:: bash
9799
98100
graft tests
99101
global-exclude *.py[cod]

source/specifications/source-distribution-format.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ specification.
2020

2121
Source distributions are also known as *sdists* for short.
2222

23+
Source trees
24+
============
25+
26+
A *source tree* is a collection of files and directories -- like a version
27+
control system checkout -- which contains a :file:`pyproject.toml` file that
28+
can be use to build a source distribution from the contained files and
29+
directories. :pep:`517` and :pep:`518` specify what is required to meet the
30+
definition of what :file:`pyproject.toml` must contain for something to be
31+
deemed a source tree.
32+
2333
Source distribution file name
2434
=============================
2535

source/tutorials/installing-packages.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ In both of the above cases, Windows users should _not_ use the
281281
:command:`source` command, but should rather run the :command:`activate`
282282
script directly from the command shell like so:
283283

284-
::
284+
.. code-block:: bat
285285
286-
<DIR>\Scripts\activate
286+
<DIR>\Scripts\activate
287287
288288
289289
@@ -618,10 +618,10 @@ create a helper application that presents the data in a :pep:`503` compliant
618618
index format, and use the ``--extra-index-url`` flag to direct pip to use
619619
that index.
620620

621-
::
621+
.. code-block:: bash
622622
623-
./s3helper --port=7777
624-
python -m pip install --extra-index-url http://localhost:7777 SomeProject
623+
./s3helper --port=7777
624+
python -m pip install --extra-index-url http://localhost:7777 SomeProject
625625
626626
627627
Installing Prereleases

0 commit comments

Comments
 (0)