Skip to content

Commit

Permalink
src/doc/en/developer: Update on spkg-install scripts of script packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Nov 22, 2023
1 parent 3960999 commit d15561b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ the following source types:

- the file ``package-version.txt`` is optional;

- installing the package runs the installation script ``spkg-install``
(see :ref:`section-spkg-install`);
- installing the package runs the installation script ``spkg-install`` or
``spkg-install.in`` (see :ref:`section-spkg-install`);

- Sage records the version number of the package installed using a file in
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
Expand All @@ -134,8 +134,8 @@ the following source types:
To summarize: the package source type is determined as follows: if
there is a file ``requirements.txt``, it is a ``pip`` package. If not,
then if there is a ``checksums.ini`` file, it is ``normal`` or ``wheel``.
Otherwise, if it has an ``spkg-install`` script, it is a ``script`` package,
and if it does not, then it is a ``dummy`` package.
Otherwise, if it has an ``spkg-install`` or ``spkg-install.in`` script,
it is a ``script`` package, and if it does not, then it is a ``dummy`` package.


.. _section-directory-structure:
Expand Down Expand Up @@ -358,13 +358,10 @@ at build time, which should to the appropriate system-specific
Install scripts of script packages
----------------------------------

A script package has a single install script named ``spkg-install``.
For script packages, it is also possible to use an install script named ``spkg-install``.
It needs to be an executable shell script; it is not subject to the templating
described in the previous section.

Sage runs ``spkg-install`` from the directory ``$SAGE_ROOT/build/pkgs/<package>``
in the environment obtained by sourcing the files ``src/bin/sage-env``,
``build/bin/sage-build-env-config``, and ``build/bin/sage-build-env``.
described in the previous section and will be executed directly from
the build directory.

.. _section-sdh-helpers:

Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/installation/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ Environment variables dealing with specific Sage packages:
- :envvar:`PARI_CONFIGURE` - use this to pass extra parameters to
PARI's ``Configure`` script, for example to specify graphics
support (which is disabled by default). See the file
:file:`build/pkgs/pari/spkg-install` for more information.
:file:`build/pkgs/pari/spkg-install.in` for more information.

- :envvar:`SAGE_TUNE_PARI` - if yes, enable PARI self-tuning. Note that
this can be time-consuming. If you set this variable to "yes", you
Expand Down

0 comments on commit d15561b

Please sign in to comment.