Skip to content

Commit aa1b968

Browse files
author
Release Manager
committed
Trac #31321: build/pkgs: Add some missing install-requires metadata, add some documentation to the developer's guide
Dmitry Marakasov (repology.org) points out that some metadata are missing in our `build/pkgs/`. https://github.com/repology/repology- updater/issues/1118#issuecomment-771102608 We fix this so that the SageMath distribution can be listed as a repository on repology.org URL: https://trac.sagemath.org/31321 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik
2 parents 89781ec + f829357 commit aa1b968

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
texttable >=1.6.3

build/pkgs/wheel/install-requires.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://trac.sagemath.org/ticket/31050 - version constraint for macOS Big Sur support
2+
wheel >=0.36.2

src/doc/en/developer/packaging.rst

+50-1
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,58 @@ Where ``sdh_pip_install`` is a function provided by ``sage-dist-helpers`` that
545545
points to the correct ``pip`` for the Python used by Sage, and includes some
546546
default flags needed for correct installation into Sage.
547547
548-
If pip will not work, you may use ``sdh_setup_bdist_wheel``, followed by
548+
If pip will not work but a command like ``python3 setup.py install``
549+
will, you may use ``sdh_setup_bdist_wheel``, followed by
549550
``sdh_store_and_pip_install_wheel .``.
550551
552+
For ``spkg-check.in`` script templates, make sure to call
553+
``sage-python23`` rather than ``python``. This will ensure that the
554+
correct version of Python is used to check the package.
555+
The same holds for ; for example, the ``scipy`` ``spkg-check.in``
556+
file contains the line
557+
558+
.. CODE-BLOCK:: bash
559+
560+
exec sage-python23 spkg-check.py
561+
562+
All normal Python packages must have a file ``install-requires.txt``.
563+
If a Python package is available on PyPI, this file must contain the
564+
name of the package as it is known to PyPI. Optionally,
565+
``install-requires.txt`` can encode version constraints (such as lower
566+
and upper bounds). The constraints are in the format of the
567+
``install_requires`` key of `setup.cfg
568+
<https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html>`_
569+
or `setup.py
570+
<https://packaging.python.org/discussions/install-requires-vs-requirements/#id5>`_.
571+
572+
The files may include comments (starting with ``#``) that explain why a particular lower
573+
bound is warranted or why we wish to include or reject certain versions.
574+
575+
For example:
576+
577+
.. CODE-BLOCK:: bash
578+
579+
$ cat build/pkgs/sphinx/package-version.txt
580+
3.1.2.p0
581+
$ cat build/pkgs/sphinx/install-requires.txt
582+
# gentoo uses 3.2.1
583+
sphinx >=3, <3.3
584+
585+
The comments may include links to Trac tickets, as in the following example:
586+
587+
.. CODE-BLOCK:: bash
588+
589+
$ cat build/pkgs/packaging/install-requires.txt
590+
packaging >=18.0
591+
# Trac #30975: packaging 20.5 is known to work but we have to silence "DeprecationWarning: Creating a LegacyVersion"
592+
593+
The currently encoded version constraints are merely a starting point.
594+
Developers and downstream packagers are invited to refine the version
595+
constraints based on their experience and tests. When a package
596+
update is made in order to pick up a critical bug fix from a newer
597+
version, then the lower bound should be adjusted.
598+
599+
551600
.. _section-spkg-SPKG-txt:
552601
553602
The SPKG.rst or SPKG.txt File

0 commit comments

Comments
 (0)