Skip to content

Commit c22ebf1

Browse files
author
Matthias Koeppe
committed
src/doc/en/developer/packaging.rst: Fix markup
1 parent a817b34 commit c22ebf1

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

src/doc/en/developer/packaging.rst

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -322,23 +322,23 @@ Likewise for :envvar:`CXXFLAGS`, :envvar:`FCFLAGS`, and :envvar:`F77FLAGS`.
322322
323323
exec python3 spkg-install.py
324324
325-
In more detail: ``sage-bootstrap-python`` runs a version of Python
326-
pre-installed on the machine, which is a build prerequisite of Sage.
327-
Note that ``sage-bootstrap-python`` accepts a wide range of Python
328-
versions, Python >= 2.6 and >= 3.4, see ``SAGE_ROOT/build/tox.ini``
329-
for details. You should only use ``sage-bootstrap-python`` for
330-
installation tasks that must be able to run before Sage has made
331-
``python3`` available. It must not be used for running ``pip`` or
332-
``setup.py`` for any package.
333-
334-
``python3`` runs the version of Python managed by Sage (either its
335-
own installation of Python 3 from an SPKG or a venv over a system
336-
python3. You should use this if you are installing a Python package
337-
to make sure that the libraries are installed in the right place.
338-
339-
By the way, there is also a script ``sage-python``. This should be
340-
used at runtime, for example in scripts in ``SAGE_LOCAL/bin`` which
341-
expect Sage's Python to already be built.
325+
In more detail: ``sage-bootstrap-python`` runs a version of Python
326+
pre-installed on the machine, which is a build prerequisite of Sage.
327+
Note that ``sage-bootstrap-python`` accepts a wide range of Python
328+
versions, Python >= 2.6 and >= 3.4, see ``SAGE_ROOT/build/tox.ini``
329+
for details. You should only use ``sage-bootstrap-python`` for
330+
installation tasks that must be able to run before Sage has made
331+
``python3`` available. It must not be used for running ``pip`` or
332+
``setup.py`` for any package.
333+
334+
``python3`` runs the version of Python managed by Sage (either its
335+
own installation of Python 3 from an SPKG or a venv over a system
336+
python3. You should use this if you are installing a Python package
337+
to make sure that the libraries are installed in the right place.
338+
339+
By the way, there is also a script ``sage-python``. This should be
340+
used at runtime, for example in scripts in ``SAGE_LOCAL/bin`` which
341+
expect Sage's Python to already be built.
342342

343343
Many packages currently do not separate the build and install steps and only
344344
provide a ``spkg-install.in`` file that does both. The separation is useful in
@@ -412,19 +412,19 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
412412
may be given as arguments.
413413
414414
- ``sdh_make [...]``: Runs ``$MAKE`` with the default target.
415-
Additional arguments to ``$MAKE`` may be given as arguments.
415+
Additional arguments to ``$MAKE`` may be given as arguments.
416416
417417
- ``sdh_make_install [...]``: Runs ``$MAKE install`` with DESTDIR
418-
correctly set to a temporary install directory, for staged
419-
installations. Additional arguments to ``$MAKE`` may be given as
420-
arguments. If ``$SAGE_DESTDIR`` is not set then the command is run
421-
with ``$SAGE_SUDO``, if set.
418+
correctly set to a temporary install directory, for staged
419+
installations. Additional arguments to ``$MAKE`` may be given as
420+
arguments. If ``$SAGE_DESTDIR`` is not set then the command is run
421+
with ``$SAGE_SUDO``, if set.
422422
423423
- ``sdh_setup_bdist_wheel [...]``: Runs ``setup.py bdist_wheel`` with
424-
the given arguments, as well as additional default arguments used for
425-
installing packages into Sage.
424+
the given arguments, as well as additional default arguments used for
425+
installing packages into Sage.
426426
427-
- ``sdh_pip_install [...]``: The equivalent of running ``pip install``
427+
- ``sdh_pip_install [...]``: The equivalent of running ``pip install``
428428
with the given arguments, as well as additional default arguments used for
429429
installing packages into Sage with pip. The last argument must be
430430
``.`` to indicate installation from the current directory.
@@ -433,17 +433,17 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
433433
creating a wheel file in ``dist/``, followed by
434434
``sdh_store_and_pip_install_wheel`` (see below).
435435
436-
- ``sdh_pip_editable_install [...]``: The equivalent of running ``pip install -e``
436+
- ``sdh_pip_editable_install [...]``: The equivalent of running ``pip install -e``
437437
with the given arguments, as well as additional default arguments used for
438438
installing packages into Sage with pip. The last argument must be
439439
``.`` to indicate installation from the current directory.
440440
See `pip documentation <https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs>`_
441441
for more details concerning editable installs.
442442
443-
- ``sdh_pip_uninstall [...]``: Runs ``pip uninstall`` with the given arguments.
443+
- ``sdh_pip_uninstall [...]``: Runs ``pip uninstall`` with the given arguments.
444444
If unsuccessful, it displays a warning.
445445
446-
- ``sdh_store_and_pip_install_wheel .``: The current directory,
446+
- ``sdh_store_and_pip_install_wheel .``: The current directory,
447447
indicated by the required argument ``.``, must have a subdirectory
448448
``dist`` containing a unique wheel file (``*.whl``).
449449
@@ -455,7 +455,7 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
455455
use the staging directory ``$SAGE_DESTDIR`` if set; otherwise, they
456456
use ``$SAGE_SUDO`` (if set).
457457
458-
- ``sdh_install [-T] SRC [SRC...] DEST``: Copies one or more files or
458+
- ``sdh_install [-T] SRC [SRC...] DEST``: Copies one or more files or
459459
directories given as ``SRC`` (recursively in the case of
460460
directories) into the destination directory ``DEST``, while
461461
ensuring that ``DEST`` and all its parent directories exist.
@@ -470,20 +470,20 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
470470
The following is automatically added to each install script, so you
471471
should not need to add it yourself.
472472
473-
- ``sdh_guard``: Wrapper for ``sdh_check_vars`` that checks some
473+
- ``sdh_guard``: Wrapper for ``sdh_check_vars`` that checks some
474474
common variables without which many/most packages won't build
475475
correctly (``SAGE_ROOT``, ``SAGE_LOCAL``, ``SAGE_SHARE``). This is
476476
important to prevent installation to unintended locations.
477477
478478
The following are also available, but rarely used.
479479
480-
- ``sdh_cmake [...]``: Runs ``cmake`` in the current directory with
480+
- ``sdh_cmake [...]``: Runs ``cmake`` in the current directory with
481481
the given arguments, as well as additional arguments passed to
482482
cmake (assuming packages are using the GNUInstallDirs module) so
483483
that ``CMAKE_INSTALL_PREFIX`` and ``CMAKE_INSTALL_LIBDIR`` are set
484484
correctly.
485485
486-
- ``sdh_preload_lib EXECUTABLE SONAME``: (Linux only -- no-op on other
486+
- ``sdh_preload_lib EXECUTABLE SONAME``: (Linux only -- no-op on other
487487
platforms.) Check shared libraries loaded by ``EXECUTABLE`` (may be a
488488
program or another library) for a library starting with ``SONAME``, and
489489
if found appends ``SONAME`` to the ``LD_PRELOAD`` environment variable.
@@ -555,7 +555,7 @@ script template to run self-tests of the package. The format for the
555555
``spkg-check`` is the same as ``spkg-build`` and ``spkg-install``. It
556556
is run after building and installing if the ``SAGE_CHECK`` environment
557557
variable is set, see the Sage installation guide. Ideally, upstream
558-
has some sort of tests suite that can be run with the standard ``make
558+
has some sort of test suite that can be run with the standard ``make
559559
check`` target. In that case, the ``spkg-check.in`` script template
560560
would simply contain:
561561
@@ -629,7 +629,8 @@ The comments may include links to GitHub Issues/PRs, as in the following example
629629
630630
$ cat build/pkgs/packaging/install-requires.txt
631631
packaging >=18.0
632-
# Issue #30975: packaging 20.5 is known to work but we have to silence "DeprecationWarning: Creating a LegacyVersion"
632+
# Issue #30975: packaging 20.5 is known to work
633+
# but we have to silence "DeprecationWarning: Creating a LegacyVersion"
633634
634635
The currently encoded version constraints are merely a starting point.
635636
Developers and downstream packagers are invited to refine the version
@@ -650,6 +651,7 @@ The ``SPKG.rst`` file should follow this pattern:
650651
.. CODE-BLOCK:: text
651652
652653
PACKAGE_NAME: One line description
654+
==================================
653655
654656
Description
655657
-----------

0 commit comments

Comments
 (0)