Skip to content

Commit

Permalink
Merge pull request #1391 from jeanas/tutorial-link-pyproject-guide
Browse files Browse the repository at this point in the history
Link to pyproject.toml guide in "Packaging Python projects" tutorial
  • Loading branch information
willingc committed Nov 17, 2023
2 parents 1142846 + 77c643c commit 5e14a51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions source/guides/writing-pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ field. For example: ``requires-python = ">= 3.8"``, or ``version =

However, in some cases, it is useful to let your build backend compute
the metadata for you. For example: many build backends can read the
version from a ``__version__`` attribute in your code, or similar.
In such cases, you should mark the field as dynamic using, e.g.,
version from a ``__version__`` attribute in your code, a Git tag, or
similar. In such cases, you should mark the field as dynamic using, e.g.,

.. code-block:: toml
Expand Down
22 changes: 11 additions & 11 deletions source/tutorials/packaging-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,16 @@ following this tutorial.
]
[project.urls]
"Homepage" = "https://github.com/pypa/sampleproject"
"Bug Tracker" = "https://github.com/pypa/sampleproject/issues"
Homepage = "https://github.com/pypa/sampleproject"
Issues = "https://github.com/pypa/sampleproject/issues"
- ``name`` is the *distribution name* of your package. This can be any name as
long as it only contains letters, numbers, ``.``, ``_`` , and ``-``. It also
must not already be taken on PyPI. **Be sure to update this with your
username** for this tutorial, as this ensures you won't try to upload a
package with the same name as one which already exists.
- ``version`` is the package version. See the :ref:`version specifier specification <version-specifiers>`
for more details on versions. Some build backends allow it to be specified
another way, such as from a file or a git tag.
- ``version`` is the package version. (Some build backends allow it to be
specified another way, such as from a file or Git tag.)
- ``authors`` is used to identify the author of the package; you specify a name
and an email for each author. You can also list ``maintainers`` in the same
format.
Expand All @@ -235,9 +234,9 @@ following this tutorial.
package. This is shown on the package detail page on PyPI.
In this case, the description is loaded from :file:`README.md` (which is a
common pattern). There also is a more advanced table form described in the
:ref:`project metadata specification <declaring-project-metadata>`.
:ref:`pyproject.toml guide <writing-pyproject-toml>`.
- ``requires-python`` gives the versions of Python supported by your
project. Installers like :ref:`pip` will look back through older versions of
project. An installer like :ref:`pip` will look back through older versions of
packages until it finds one that has a matching Python version.
- ``classifiers`` gives the index and :ref:`pip` some additional metadata
about your package. In this case, the package is only compatible with Python
Expand All @@ -249,10 +248,11 @@ following this tutorial.
- ``urls`` lets you list any number of extra links to show on PyPI.
Generally this could be to the source, documentation, issue trackers, etc.

See the :ref:`project metadata specification <declaring-project-metadata>` for
details on these and other fields that can be defined in the ``[project]``
table. Other common fields are ``keywords`` to improve discoverability and the
``dependencies`` that are required to install your package.
See the :ref:`pyproject.toml guide <writing-pyproject-toml>` for details
on these and other fields that can be defined in the ``[project]``
table. Other common fields are ``keywords`` to improve discoverability
and the ``dependencies`` that are required to install your package.


Creating README.md
------------------
Expand Down

0 comments on commit 5e14a51

Please sign in to comment.