Skip to content

Commit 71921e5

Browse files
authored
Merge branch 'main' into copy-edit-pipx
2 parents 948840f + 6f2804e commit 71921e5

8 files changed

Lines changed: 98 additions & 22 deletions

source/contribute.rst

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ including:
1111
* Reviewing new contributions
1212
* Revising existing content
1313
* Writing new content
14+
* Translate the guide
1415

1516
Most of the work on the |PyPUG| takes place on the
1617
`project's GitHub repository`__. To get started, check out the list of
@@ -67,7 +68,54 @@ an agreed-upon interface for interoperability between packaging tools.
6768
:doc:`example specification-style document <specifications/core-metadata>`.
6869

6970

71+
Translations
72+
============
7073

74+
We use `Weblate`_ to manage translations of this project.
75+
Please visit the `packaging.python.org`_ project on Weblate to contribute.
76+
77+
If you are experiencing issues while you are working on translations,
78+
please open an issue on `Github`_.
79+
80+
.. tip::
81+
82+
Any translations of this project should follow `reStructuredText syntax`_.
83+
84+
.. _Weblate: https://weblate.org/
85+
.. _packaging.python.org: https://hosted.weblate.org/projects/pypa/packaging-python-org/
86+
.. _Github: https://github.com/pypa/packaging.python.org/issues
87+
.. _reStructuredText syntax: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
88+
89+
Adding a language
90+
-----------------
91+
92+
If your language is not listed on `packaging.python.org`_, click the button
93+
:guilabel:`Start new translation` at the bottom of the language list and add
94+
the language you want to translate.
95+
96+
Following reStructuredText syntax
97+
---------------------------------
98+
99+
If you are not familiar with reStructuredText (RST) syntax, please read `this guide`_
100+
before translating on Weblate.
101+
102+
**Do not translate the text in reference directly**
103+
104+
When translating the text in reference, please do not translate them directly.
105+
106+
| Wrong: Translate the following text directly:
107+
108+
.. code-block:: rst
109+
110+
`some ref`_ -> `TRANSLATED TEXT HERE`_
111+
112+
| Right: Translate the following text with your own language and add the original reference:
113+
114+
.. code-block:: rst
115+
116+
`some ref`_ -> `TRANSLATED TEXT HERE <some ref>`_
117+
118+
.. _this guide: https://docutils.sourceforge.io/docs/user/rst/quickref.html
71119

72120
Building the guide locally
73121
==========================
@@ -77,7 +125,9 @@ in order to test your changes. In order to build this guide locally, you'll
77125
need:
78126

79127
1. `Nox <https://nox.readthedocs.io/en/latest/>`_. You can install or upgrade
80-
nox using ``pip``::
128+
nox using ``pip``:
129+
130+
.. code-block:: bash
81131
82132
python -m pip install --user nox
83133
@@ -88,19 +138,23 @@ need:
88138
.. _Hitchhiker's Guide to Python installation instructions:
89139
http://docs.python-guide.org/en/latest/starting/installation/
90140

91-
To build the guide, run the following bash command in the source folder::
141+
To build the guide, run the following bash command in the source folder:
92142

93-
nox -s build
143+
.. code-block:: bash
144+
145+
nox -s build
94146
95147
After the process has completed you can find the HTML output in the
96148
``./build/html`` directory. You can open the ``index.html`` file to view the
97149
guide in web browser, but it's recommended to serve the guide using an HTTP
98150
server.
99151

100152
You can build the guide and serve it via an HTTP server using the following
101-
command::
153+
command:
154+
155+
.. code-block:: bash
102156
103-
nox -s preview
157+
nox -s preview
104158
105159
The guide will be browsable via http://localhost:8000.
106160

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)