Skip to content

Commit

Permalink
Trac #29655: Improve build/pkgs/*/SPKG.rst
Browse files Browse the repository at this point in the history
With #29633, we now generate a full list of packages that Sage uses
(with links to documentation - see #27495)
for the reference manual from information in `build/pkgs/*/SPKG.rst`
(which used to be `SPKG.txt`).

The purpose of this ticket is to improve the `SPKG.rst` files and the
scripts that transform them to generate a part of the Sage reference
manual.

1. If other sources have better information than what is in
`build/pkgs`, update `build/pkgs` accordingly. (See
https://wiki.sagemath.org/SageWiki)

   - (done:)
https://github.com/sagemath/website/blob/master/conf/packages.yaml
(which is used for generating http://www.sagemath.org/links-
components.html)
   - (done:) https://wiki.sagemath.org/spkg (another incomplete list of
packages)
   - `src/doc/en/installation/standard_packages.rst` (yet another
incomplete list of packages)

2. Delete/archive the obsolete other sources.

   - sagemath/website#212 removes
`packages.yaml`
   - https://wiki.sagemath.org/spkg has been cleared

3. Change the titles of the `SPKG.rst` files to use the format
"`spkg_name`: Short description". This will improve the table of
contents shown in
https://doc.sagemath.org/html/en/reference/spkg/index.html, which the
Sage website is pointing to after
sagemath/website#212

4. Extend `build/bin/sage-spkg-info` and use it to format additional
information from `build/pkgs/SPKG/`.

5. In addition to the full alphabetical list of packages, also show the
standard packages, the optional packages, and the experimental packages
separately.

Follow-up:
- #31136 Rename SPKGs to match their PyPI name

URL: https://trac.sagemath.org/29655
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Jan 10, 2021
2 parents f1c9633 + 49ad8ae commit f2aca23
Show file tree
Hide file tree
Showing 296 changed files with 906 additions and 850 deletions.
3 changes: 3 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ case $system:$command in
freebsd*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pkg install $system_packages"
;;
nix*:install)
[ -n "$system_packages" ] && echo "${PROMPT}nix-env --install $system_packages"
;;
pip:install)
[ -n "$system_packages" ] && echo "${PROMPT}sage -pip install $system_packages"
;;
Expand Down
4 changes: 2 additions & 2 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ lookup_param()
{
local param=$1
local file=$2
sed -n "s/^${param} *= *//p" $file
# Ignore errors if the file does not exist
sed -n "s/^${param} *= *//p" $file 2>/dev/null
}

write_to_tty()
Expand Down Expand Up @@ -317,7 +318,6 @@ fi
USE_LOCAL_SCRIPTS=yes
PKG_BASE_VER=`echo $PKG_VER | sed 's/\.p[0-9][0-9]*$//'`
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini" | sed "s/VERSION/$PKG_BASE_VER/"`
echo "Found local metadata for $PKG_NAME"

# Warning for experimental packages
if [ x`cat "$PKG_SCRIPTS/type"` = x"experimental" -a $INFO = 0 ]; then
Expand Down
39 changes: 33 additions & 6 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,27 @@ for ext in rst txt; do
done
if [ -r "$PKG_SCRIPTS/type" ] ; then
echo
echo "== Type =="
echo "Type"
echo "----"
echo
cat "$PKG_SCRIPTS/type"
echo
fi
echo "== Equivalent System Packages =="
echo
echo "Version Information"
echo "-------------------"
echo
for a in package-version.txt requirements.txt install-requires.txt; do
if [ -f "$PKG_SCRIPTS"/"$a" ]; then
echo "$a::"
echo
sed 's/^/ /' "$PKG_SCRIPTS/$a"
echo
fi
done
echo
echo "Equivalent System Packages"
echo "--------------------------"
echo
PKG_DISTROS="$PKG_SCRIPTS"/distros
for system_package_file in "$PKG_DISTROS"/*.txt; do
Expand All @@ -40,8 +55,15 @@ for system_package_file in "$PKG_DISTROS"/*.txt; do
echo "$system:"
;;
esac
printf " "
sage-print-system-package-command $system --prompt --sudo install $system_packages
if [ -n "$OUTPUT_RST" ]; then
echo
echo ".. CODE-BLOCK:: bash"
echo
fi
sage-print-system-package-command $system --prompt=' $ ' --sudo install $system_packages
if [ -n "$OUTPUT_RST" ]; then
echo
fi
fi
done
if [ -z "$system" ]; then
Expand All @@ -52,8 +74,13 @@ else
echo "If the system package is installed, ./configure will check whether it can be used."
else
echo "However, these system packages will not be used for building Sage"
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://trac.sagemath.org/ticket/27330"
if [ -f "$PKG_SCRIPTS"/install-requires.txt ]; then
echo "because using Python site-packages is not supported by the Sage distribution;"
echo "see https://trac.sagemath.org/ticket/29023"
else
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://trac.sagemath.org/ticket/27330"
fi
fi
fi
echo
6 changes: 4 additions & 2 deletions build/pkgs/4ti2/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
4ti2
====
4ti2: Algebraic, geometric and combinatorial problems on linear spaces
======================================================================

Description
-----------
Expand All @@ -16,6 +16,8 @@ License
Upstream Contact
----------------

- https://4ti2.github.io/

- Raymond Hemmecke, TU Munich, Germany
- Matthias Köppe, UC Davis, CA, USA

Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/_recommended/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\_recommended
=============
\_recommended: Represents system packages recommended for additional functionality
==================================================================================

Description
-----------
Expand Down
9 changes: 7 additions & 2 deletions build/pkgs/alabaster/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alabaster
=========
alabaster: Default theme for the Sphinx documentation system
============================================================

Description
-----------
Expand All @@ -13,3 +13,8 @@ is selected as the default theme.

Live examples of this theme can be seen on paramiko.org, fabfile.org and
pyinvoke.org.

Upstream Contact
----------------

https://alabaster.readthedocs.io/en/latest/
9 changes: 7 additions & 2 deletions build/pkgs/appnope/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
appnope
=======
appnope: Disable App Nap on OS X
================================

Description
-----------

Disable App Nap on OS X 10.9

Upstream Contact
----------------

https://github.com/minrk/appnope
10 changes: 7 additions & 3 deletions build/pkgs/arb/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
arb
===
arb: Arbitrary-precision floating-point ball arithmetic
=======================================================

Description
-----------
Expand All @@ -20,7 +20,11 @@ GNU General Public License v2+
Upstream Contact
----------------

- Fredrik Johansson: [email protected]
- Fredrik Johansson: [email protected]

- https://arblib.org/

- http://github.com/fredrik-johansson/arb/

Dependencies
------------
Expand Down
7 changes: 4 additions & 3 deletions build/pkgs/atlas/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ATLAS
=====
atlas: Automatically Tuned Linear Algebra Software (BLAS implementation)
========================================================================

Description
-----------

This spkg builds ATLAS for Sage.
Automatically Tuned Linear Algebra Software

License
-------
Expand All @@ -15,6 +15,7 @@ License
Upstream Contact
----------------

- http://math-atlas.sourceforge.net
- Atlas devel mailing list.
- Clint Whaley has frequently answered questions from the Sage project

Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/attrs/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
attrs
=====
attrs: Decorator for Python classes with attributes
===================================================

Description
-----------
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/awali/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
awali
=====
awali: Computation of/with finite state machines
================================================

Description
-----------
Expand Down
11 changes: 7 additions & 4 deletions build/pkgs/babel/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
babel
=====
babel: Internationalization utilities for Python
================================================

Description
-----------

Internationalization utilities

A collection of tools for internationalizing Python applications.

Upstream Contact
----------------

http://babel.pocoo.org/en/latest/
4 changes: 2 additions & 2 deletions build/pkgs/backcall/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
backcall
========
backcall: Specifications for callback functions
===============================================

Description
-----------
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/barvinok/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
barvinok
========
barvinok: Projections of integer point sets of parametric polytopes
===================================================================

Description
-----------
Expand Down
19 changes: 19 additions & 0 deletions build/pkgs/beautifulsoup4/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
beautifulsoup4: A screen-scraping library
=========================================

Description
-----------

Screen-scraping library

License
-------

MIT

Upstream Contact
----------------

https://pypi.org/project/beautifulsoup4/

https://www.crummy.com/software/BeautifulSoup/
8 changes: 5 additions & 3 deletions build/pkgs/benzene/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Benzene
=======
benzene: Generate fusenes and benzenoids with a given number of faces
=====================================================================

Description
-----------
Expand All @@ -21,7 +21,9 @@ Upstream Contact

Benzene was written by Gunnar Brinkmann and Gilles Caporossi. This
version was adapted by Gunnar Brinkmann and Nico Van Cleemput for
Grinvin. http://www.grinvin.org/
Grinvin.

http://www.grinvin.org/

Dependencies
------------
Expand Down
17 changes: 17 additions & 0 deletions build/pkgs/biopython/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
biopython: Tools for computational molecular biology
====================================================

Description
-----------

Freely available tools for computational molecular biology.

License
-------

Upstream Contact
----------------

https://pypi.org/project/biopython/

http://biopython.org/
4 changes: 2 additions & 2 deletions build/pkgs/bleach/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bleach
======
bleach: An HTML-sanitizing tool
===============================

Description
-----------
Expand Down
5 changes: 2 additions & 3 deletions build/pkgs/bliss/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

bliss 0.73+debian-1
===================
bliss: Computing automorphism groups and canonical forms of graphs
==================================================================

Description
-----------
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/boost/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
boost
=====
boost: Portable C++ libraries (full set)
========================================

Description
-----------
Expand Down
8 changes: 4 additions & 4 deletions build/pkgs/boost_cropped/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Boost
=====
boost_cropped: Portable C++ libraries (subset needed for Sage)
==============================================================

Description
-----------
Expand All @@ -19,8 +19,6 @@ new C++0x Standard now being finalized. C++0x will also include several
more Boost libraries in addition to those from TR1. More Boost libraries
are proposed for TR2.

Website: http://www.boost.org/

License
-------

Expand All @@ -30,6 +28,8 @@ Boost Software License - see http://www.boost.org/users/license.html
Upstream Contact
----------------

Website: http://www.boost.org/

See mailing list page at http://www.boost.org/community/groups.html

Dependencies
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/brial/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
BRiAl
=====
brial: Boolean Ring Algebra implementation using binary decision diagrams
=========================================================================

Description
-----------

BRiAl is the successor to PolyBoRi.
BRiAl ("Boolean Ring Algebra") is the successor to PolyBoRi.

The core of PolyBoRi is a C++ library, which provides high-level data
types for Boolean polynomials and monomials, exponent vectors, as well
Expand Down
11 changes: 6 additions & 5 deletions build/pkgs/buckygen/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Buckygen
========
buckygen: Efficient generation of nonisomorphic fullerenes
==========================================================

Description
-----------
Expand All @@ -12,15 +12,16 @@ faces are pentagons or hexagons.
License
-------

Buckygen is licensed under the GNU General Public License v3 ( June 2007
)
Buckygen is licensed under the GNU General Public License v3 (June 2007)


Upstream Contact
----------------

Buckygen was mainly written by Jan Goedgebeur,
jan.goedgebeur[at]ugent.be. http://caagt.ugent.be/buckygen/
jan.goedgebeur[at]ugent.be.

http://caagt.ugent.be/buckygen/

Dependencies
------------
Expand Down
Loading

0 comments on commit f2aca23

Please sign in to comment.