Skip to content

Commit

Permalink
gh-37444: Remove mention of SPKG.txt
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
It's all been switched over to `SPKG.rst`. We remove the last traces of
the old format.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #37444
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
  • Loading branch information
Release Manager committed Mar 29, 2024
2 parents c38ad5d + f4a056c commit dad3cb9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 31 deletions.
4 changes: 2 additions & 2 deletions build/bin/sage-site
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ usage() {
echo "Sage-the-distribution options:"
echo " --optional -- list all optional packages that can be installed"
echo " --experimental -- list all experimental packages that can be installed"
echo " --info [packages] -- print the SPKG.txt or SPKG.rst of the given packages,"
echo " and some additional information."
echo " --info [packages] -- print the description (SPKG.rst) of the given packages"
echo " and some additional information"
echo " -i [packages] -- install the given Sage packages"
}

Expand Down
14 changes: 6 additions & 8 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ if ! props=$(sage-package properties --format=shell $PKG_BASE 2> /dev/null); the
fi
eval "$props"
eval PKG_SCRIPTS=\$path_$PKG_BASE
for ext in rst txt; do
SPKG_FILE="$PKG_SCRIPTS/SPKG.$ext"
if [ -f "$SPKG_FILE" ]; then
# for sphinx 4.4 we need to replace all direct links by some "extlink" (issue 33272)
sed -e "1,3s/^ *Sage: Open Source Mathematics Software:/$PKG_BASE:/" -e "s|https://github.com/sagemath/sage/issues/\([0-9]*\)|:issue:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" "$SPKG_FILE"
break
fi
done
SPKG_FILE="$PKG_SCRIPTS/SPKG.rst"
if [ -f "$SPKG_FILE" ]; then
# for sphinx 4.4 we need to replace all direct links by some "extlink" (issue 33272)
sed -e "1,3s/^ *Sage: Open Source Mathematics Software:/$PKG_BASE:/" -e "s|https://github.com/sagemath/sage/issues/\([0-9]*\)|:issue:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" "$SPKG_FILE"
break
fi
if [ -r "$PKG_SCRIPTS/type" ] ; then
echo
echo "Type"
Expand Down
9 changes: 0 additions & 9 deletions build/pkgs/glpk/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,3 @@ Special Update/Build Instructions
(Instead, we should perhaps use ``--enable-static --enable-shared``
to
go safe.)

Patches
~~~~~~~

- All patches below are currently used by spkg-src
- src/01-zlib.patch: don't build the included zlib library.

The numbering reflect the order in which they have been created from
glpk pristine's sources
2 changes: 1 addition & 1 deletion build/pkgs/glpk/spkg-check.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Let GLPK use Sage's GMP/MPIR (cf. comments in SPKG.txt and spkg-install):
# Let GLPK use Sage's GMP (cf. comments in spkg-install.in):
CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"
LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS"

Expand Down
6 changes: 2 additions & 4 deletions build/pkgs/glpk/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ cp "$SAGE_ROOT"/config/config.* .
# Note: The following doesn't work with spaces in `$SAGE_LOCAL`, but we don't
# support that anyway, since many upstream packages don't.
# On the other hand, the only packages GLPK uses that Sage provides are
# GMP/MPIR and zlib, so we should just use `$SAGE_CONFIGURE_GMP` and
# GMP and zlib, so we should just use `$SAGE_CONFIGURE_GMP` and
# `--with-zlib="$SAGE_LOCAL"` below (which is safe), and omit the fol-
# lowing two lines. (TODO)
#
# Turns out that (as of version 4.55)
# 1) GLPK unconditionally uses its own copy of zlib (cf. `SPKG.txt`),
# and the `configure` option `--with-zlib` is no longer valid;
# 2) `configure` doesn't support specifying the location of the GMP
# `configure` doesn't support specifying the location of the GMP
# library to use; only `--with-gmp[=yes]` or `--with-gmp=no`
# are valid options. So we *have to* add Sage's include and
# library directories to `CPPFLAGS` (done here) and `LDFLAGS`
Expand Down
15 changes: 8 additions & 7 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,10 @@ The ``SPKG.rst`` file should follow this pattern:
with ``PACKAGE_NAME`` replaced by the SPKG name (= the directory name in
``build/pkgs``).
Legacy ``SPKG.txt`` files have an additional changelog section, but this
information is now kept in the git repository.
Do not include changelogs in the ``SPKG.rst`` file. We keep track of
this information in the commit messages and the pull request
discussions on GitHub only.
.. _section-dependencies:
Expand Down Expand Up @@ -1415,11 +1417,10 @@ above.
License information
-------------------
If you are patching a standard Sage spkg, then you should make sure that
the license information for that package is up-to-date, both in its
``SPKG.rst`` or ``SPKG.txt`` file and in the file ``SAGE_ROOT/COPYING.txt``. For
example, if you are producing an spkg which upgrades the vanilla source
to a new version, check whether the license changed between versions.
License information for a package needs to be put both in its
``SPKG.rst`` file and in the file ``SAGE_ROOT/COPYING.txt``.
Whenever upgrading a package, check whether the license changed between
versions.
If an upstream tarball of a package cannot be redistributed for license
reasons, rename it to include the string ``do-not-distribute``. This
Expand Down

0 comments on commit dad3cb9

Please sign in to comment.