Skip to content

Commit 1f03957

Browse files
committed
Merge branch 't/34450/standard_wheel_packages' into t/33833/make-furo-standard-theme
2 parents 6f813de + d887d44 commit 1f03957

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

build/bin/sage-spkg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ cd "$PKG_NAME" || exit $?
453453

454454
case "$PKG_SRC" in
455455
*.whl)
456-
# (Non-platform) wheel. Do not extract, do not create a src directory,
456+
# (Platform-independent) wheel
457+
# Do not extract, do not create a src directory,
457458
# just copy to dist/ and create a simple install script.
458459
mkdir -p dist
459460
cp "$PKG_SRC" dist/

src/doc/en/developer/packaging.rst

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,21 @@ the following source types:
7979
(see :ref:`section-spkg-install`);
8080

8181
- Sage records the version number of the package installed using a file in
82-
``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation
82+
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
83+
if ``package-version.txt`` changes.
84+
85+
#. A ``wheel`` package:
86+
87+
- comes from the wheel file named in the required file ``checksums.ini``
88+
and hosted on the Sage mirrors;
89+
90+
- per policy, only platform-independent wheels are allowed, i.e.,
91+
``*-none-any.whl`` files;
92+
93+
- its version number is defined by the required file ``package-version.txt``;
94+
95+
- Sage records the version number of the package installed using a file in
96+
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
8397
if ``package-version.txt`` changes.
8498

8599
#. A ``pip`` package:
@@ -107,7 +121,7 @@ the following source types:
107121
(see :ref:`section-spkg-install`);
108122

109123
- Sage records the version number of the package installed using a file in
110-
``$SAGE_LOCAL/var/lib/sage/installed/`` and will re-run the installation
124+
``$SAGE_LOCAL/var/lib/sage/installed/`` and will rerun the installation
111125
if ``package-version.txt`` changes.
112126

113127
#. A ``dummy`` package:
@@ -119,7 +133,7 @@ the following source types:
119133

120134
To summarize: the package source type is determined as follows: if
121135
there is a file ``requirements.txt``, it is a ``pip`` package. If not,
122-
then if there is a ``checksums.ini`` file, it is ``normal``.
136+
then if there is a ``checksums.ini`` file, it is ``normal`` or ``wheel``.
123137
Otherwise, if it has an ``spkg-install`` script, it is a ``script`` package,
124138
and if it does not, then it is a ``dummy`` package.
125139

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

0 commit comments

Comments
 (0)