Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 't/34450/standard_wheel_packages' into t/33833/make-furo…
Browse files Browse the repository at this point in the history
…-standard-theme
  • Loading branch information
kwankyu committed Aug 29, 2022
2 parents 6f813de + d887d44 commit 1f03957
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ cd "$PKG_NAME" || exit $?

case "$PKG_SRC" in
*.whl)
# (Non-platform) wheel. Do not extract, do not create a src directory,
# (Platform-independent) wheel
# Do not extract, do not create a src directory,
# just copy to dist/ and create a simple install script.
mkdir -p dist
cp "$PKG_SRC" dist/
Expand Down
27 changes: 22 additions & 5 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,21 @@ the following source types:
(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 re-run the installation
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
if ``package-version.txt`` changes.

#. A ``wheel`` package:

- comes from the wheel file named in the required file ``checksums.ini``
and hosted on the Sage mirrors;

- per policy, only platform-independent wheels are allowed, i.e.,
``*-none-any.whl`` files;

- its version number is defined by the required file ``package-version.txt``;

- Sage records the version number of the package installed using a file in
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
if ``package-version.txt`` changes.

#. A ``pip`` package:
Expand Down Expand Up @@ -107,7 +121,7 @@ the following source types:
(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 re-run the installation
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
if ``package-version.txt`` changes.

#. A ``dummy`` package:
Expand All @@ -119,7 +133,7 @@ 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``.
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.

Expand Down Expand Up @@ -584,7 +598,7 @@ For example, the ``scipy`` ``spkg-check.in`` file contains the line
exec python3 spkg-check.py
All normal Python packages must have a file ``install-requires.txt``.
All normal Python packages and all wheel packages must have a file ``install-requires.txt``.
If a Python package is available on PyPI, this file must contain the
name of the package as it is known to PyPI. Optionally,
``install-requires.txt`` can encode version constraints (such as lower
Expand Down Expand Up @@ -778,7 +792,7 @@ Where packages are installed
The Sage distribution has the notion of several installation trees.
- ``$SAGE_VENV`` is the default installation tree for all Python packages, i.e.,
normal packages with an ``install-requires.txt`` and pip packages
normal packages with an ``install-requires.txt``, wheel packages, and pip packages
with a ``requirements.txt``.
- ``$SAGE_LOCAL`` is the default installation tree for all non-Python packages.
Expand Down Expand Up @@ -1199,6 +1213,9 @@ must meet the following requirements:
- **Build Support**. The code must build on all the fully supported
platforms (Linux, macOS, Cygwin); see :ref:`chapter-portability_testing`.
It must be installed either from source as a normal package,
or as a Python (platform-independent) wheel package, see
:ref:`section-package-source-types`.
- **Quality**. The code should be "better" than any other available
code (that passes the two above criteria), and the authors need to
Expand Down

0 comments on commit 1f03957

Please sign in to comment.