From b48ef32c926052695008b2f4a8a2c68ca0d88678 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Mon, 24 Jan 2022 23:47:19 +0100 Subject: doc: Fix trailing spaces, tabs, and missing newlines at end of file. --- docs/build_meta.rst | 28 ++++++++++++++-------------- docs/deprecated/distutils-legacy.rst | 2 +- docs/deprecated/functionalities.rst | 2 +- docs/userguide/declarative_config.rst | 4 ++-- docs/userguide/distribution.rst | 2 +- docs/userguide/quickstart.rst | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) (limited to 'docs') diff --git a/docs/build_meta.rst b/docs/build_meta.rst index 27df70a2..9c77f9f3 100644 --- a/docs/build_meta.rst +++ b/docs/build_meta.rst @@ -9,29 +9,29 @@ Python packaging has come `a long way `_ The traditional ``setuptools`` way of packaging Python modules uses a ``setup()`` function within the ``setup.py`` script. Commands such as -``python setup.py bdist`` or ``python setup.py bdist_wheel`` generate a -distribution bundle and ``python setup.py install`` installs the distribution. -This interface makes it difficult to choose other packaging tools without an +``python setup.py bdist`` or ``python setup.py bdist_wheel`` generate a +distribution bundle and ``python setup.py install`` installs the distribution. +This interface makes it difficult to choose other packaging tools without an overhaul. Because ``setup.py`` scripts allowed for arbitrary execution, it proved difficult to provide a reliable user experience across environments and history. `PEP 517 `_ therefore came to -rescue and specified a new standard to +rescue and specified a new standard to package and distribute Python modules. Under PEP 517: a ``pyproject.toml`` file is used to specify what program to use - for generating distribution. + for generating distribution. - Then, two functions provided by the program, ``build_wheel(directory: str)`` - and ``build_sdist(directory: str)`` create the distribution bundle at the - specified ``directory``. The program is free to use its own configuration - script or extend the ``.toml`` file. + Then, two functions provided by the program, ``build_wheel(directory: str)`` + and ``build_sdist(directory: str)`` create the distribution bundle at the + specified ``directory``. The program is free to use its own configuration + script or extend the ``.toml`` file. Lastly, ``pip install *.whl`` or ``pip install *.tar.gz`` does the actual installation. If ``*.whl`` is available, ``pip`` will go ahead and copy the files into ``site-packages`` directory. If not, ``pip`` will look at - ``pyproject.toml`` and decide what program to use to 'build from source' + ``pyproject.toml`` and decide what program to use to 'build from source' (the default is ``setuptools``) With this standard, switching between packaging tools becomes a lot easier. ``build_meta`` @@ -48,8 +48,8 @@ scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file:: setup.cfg meowpkg/__init__.py -The pyproject.toml file is required to specify the build system (i.e. what is -being used to package your scripts and install from source). To use it with +The pyproject.toml file is required to specify the build system (i.e. what is +being used to package your scripts and install from source). To use it with setuptools, the content would be:: [build-system] @@ -67,7 +67,7 @@ specify the package information:: name = meowpkg version = 0.0.1 description = a package that meows - + [options] packages = find: @@ -77,7 +77,7 @@ Now generate the distribution. To build the package, use $ pip install -q build $ python -m build -And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed +And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed and installed:: dist/ diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index 94104fe8..148dc259 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -5,7 +5,7 @@ Setuptools and the PyPA have a `stated goal `_ scheme, but it also supports legacy versions. There are, however, a few special things to watch out for, in order to ensure that setuptools and diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 4c62c6df..28d4ac33 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -96,7 +96,7 @@ to specify to properly package your project. Automatic package discovery =========================== For simple projects, it's usually easy enough to manually add packages to -the ``packages`` keyword in ``setup.cfg``. However, for very large projects, +the ``packages`` keyword in ``setup.cfg``. However, for very large projects, it can be a big burden to keep the package list updated. ``setuptools`` therefore provides two convenient tools to ease the burden: :literal:`find:\ ` and :literal:`find_namespace:\ `. To use it in your project: @@ -189,9 +189,9 @@ Development mode .. tip:: - Prior to :ref:`pip v21.1 `, a ``setup.py`` script was - required to be compatible with development mode. With late - versions of pip, any project may be installed in this mode. + Prior to :ref:`pip v21.1 `, a ``setup.py`` script was + required to be compatible with development mode. With late + versions of pip, any project may be installed in this mode. ``setuptools`` allows you to install a package without copying any files to your interpreter directory (e.g. the ``site-packages`` directory). -- cgit v1.2.1