@@ -322,23 +322,23 @@ Likewise for :envvar:`CXXFLAGS`, :envvar:`FCFLAGS`, and :envvar:`F77FLAGS`.
322
322
323
323
exec python3 spkg-install.py
324
324
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.
342
342
343
343
Many packages currently do not separate the build and install steps and only
344
344
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".
412
412
may be given as arguments.
413
413
414
414
- ` ` 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.
416
416
417
417
- ` ` 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.
422
422
423
423
- ` ` 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.
426
426
427
- - ` ` sdh_pip_install [...]` ` : The equivalent of running ` ` pip install` `
427
+ - ` ` sdh_pip_install [...]` ` : The equivalent of running ` ` pip install` `
428
428
with the given arguments, as well as additional default arguments used for
429
429
installing packages into Sage with pip. The last argument must be
430
430
` ` .` ` to indicate installation from the current directory.
@@ -433,17 +433,17 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
433
433
creating a wheel file in ` ` dist/` ` , followed by
434
434
` ` sdh_store_and_pip_install_wheel` ` (see below).
435
435
436
- - ` ` sdh_pip_editable_install [...]` ` : The equivalent of running ` ` pip install -e` `
436
+ - ` ` sdh_pip_editable_install [...]` ` : The equivalent of running ` ` pip install -e` `
437
437
with the given arguments, as well as additional default arguments used for
438
438
installing packages into Sage with pip. The last argument must be
439
439
` ` .` ` to indicate installation from the current directory.
440
440
See ` pip documentation < https://pip.pypa.io/en/stable/cli/pip_install/# editable-installs>` _
441
441
for more details concerning editable installs.
442
442
443
- - ` ` sdh_pip_uninstall [...]` ` : Runs ` ` pip uninstall` ` with the given arguments.
443
+ - ` ` sdh_pip_uninstall [...]` ` : Runs ` ` pip uninstall` ` with the given arguments.
444
444
If unsuccessful, it displays a warning.
445
445
446
- - ` ` sdh_store_and_pip_install_wheel .` ` : The current directory,
446
+ - ` ` sdh_store_and_pip_install_wheel .` ` : The current directory,
447
447
indicated by the required argument ` ` .` ` , must have a subdirectory
448
448
` ` dist` ` containing a unique wheel file (` ` *.whl` ` ).
449
449
@@ -455,7 +455,7 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
455
455
use the staging directory ` ` $SAGE_DESTDIR ` ` if set; otherwise, they
456
456
use ` ` $SAGE_SUDO ` ` (if set).
457
457
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
459
459
directories given as ` ` SRC` ` (recursively in the case of
460
460
directories) into the destination directory ` ` DEST` ` , while
461
461
ensuring that ` ` DEST` ` and all its parent directories exist.
@@ -470,20 +470,20 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
470
470
The following is automatically added to each install script, so you
471
471
should not need to add it yourself.
472
472
473
- - ` ` sdh_guard` ` : Wrapper for ` ` sdh_check_vars` ` that checks some
473
+ - ` ` sdh_guard` ` : Wrapper for ` ` sdh_check_vars` ` that checks some
474
474
common variables without which many/most packages won't build
475
475
correctly (` ` SAGE_ROOT` ` , ` ` SAGE_LOCAL` ` , ` ` SAGE_SHARE` ` ). This is
476
476
important to prevent installation to unintended locations.
477
477
478
478
The following are also available, but rarely used.
479
479
480
- - ` ` sdh_cmake [...]` ` : Runs ` ` cmake` ` in the current directory with
480
+ - ` ` sdh_cmake [...]` ` : Runs ` ` cmake` ` in the current directory with
481
481
the given arguments, as well as additional arguments passed to
482
482
cmake (assuming packages are using the GNUInstallDirs module) so
483
483
that ` ` CMAKE_INSTALL_PREFIX` ` and ` ` CMAKE_INSTALL_LIBDIR` ` are set
484
484
correctly.
485
485
486
- - ` ` sdh_preload_lib EXECUTABLE SONAME` ` : (Linux only -- no-op on other
486
+ - ` ` sdh_preload_lib EXECUTABLE SONAME` ` : (Linux only -- no-op on other
487
487
platforms.) Check shared libraries loaded by ` ` EXECUTABLE` ` (may be a
488
488
program or another library) for a library starting with ` ` SONAME` ` , and
489
489
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
555
555
` ` spkg-check` ` is the same as ` ` spkg-build` ` and ` ` spkg-install` ` . It
556
556
is run after building and installing if the ` ` SAGE_CHECK` ` environment
557
557
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
559
559
check` ` target. In that case, the ` ` spkg-check.in` ` script template
560
560
would simply contain:
561
561
@@ -629,7 +629,8 @@ The comments may include links to GitHub Issues/PRs, as in the following example
629
629
630
630
$ cat build/pkgs/packaging/install-requires.txt
631
631
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"
633
634
634
635
The currently encoded version constraints are merely a starting point.
635
636
Developers and downstream packagers are invited to refine the version
@@ -650,6 +651,7 @@ The ``SPKG.rst`` file should follow this pattern:
650
651
.. CODE-BLOCK:: text
651
652
652
653
PACKAGE_NAME: One line description
654
+ ==================================
653
655
654
656
Description
655
657
-----------
0 commit comments