Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SUDO=
PROMPT=
SPKG=no
if [ -n "$OUTPUT_RST" ]; then
COMMENT=""
COMMENT="$RST_INDENT"
else
COMMENT="# "
fi
Expand Down Expand Up @@ -86,7 +86,7 @@ function print_shell_command()
{
if [ -n "$OUTPUT_RST" ]; then
echo
echo ".. CODE-BLOCK:: bash"
echo "$RST_INDENT.. CODE-BLOCK:: bash"
echo
fi
# shell-quote arguments if necessary
Expand All @@ -103,6 +103,9 @@ function print_shell_command()

function print_comment()
{
if [ -n "$OUTPUT_RST" ]; then
echo
fi
echo "${COMMENT}$1"
}

Expand Down
56 changes: 38 additions & 18 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ if [ -n "$OUTPUT_RST" ]; then
echo ".. _spkg_$PKG_BASE:"
echo
ref () { echo ":ref:\`$1\`"; }
spkg () { ref spkg_$1; }
issue () { echo ":issue:\`$1\`"; }
code () { echo "\`\`$*\`\`"; }
tab () { echo ".. tab:: $1"; }
else
ref () { echo "$1"; }
spkg () { echo "$1"; }
issue () { echo "https://github.com/sagemath/sage/issues/$1"; }
code () { echo "$1"; }
tab () { echo "$1:"; }
fi
PKG_SCRIPTS="$SAGE_ROOT/build/pkgs/$PKG_BASE"
for ext in rst txt; do
Expand Down Expand Up @@ -56,7 +60,7 @@ for dep_file in dependencies dependencies_order_only; do
# Looks like a package
*) if [ -r "$SAGE_ROOT/build/pkgs/$dep/SPKG.rst" ]; then
# This RST label is set in src/doc/bootstrap
echo "- $(ref spkg_$dep)"
echo "- $(spkg $dep)"
else
echo "- $dep"
fi;;
Expand Down Expand Up @@ -96,31 +100,47 @@ for system_package_file in "$PKG_DISTROS"/*.txt; do
esac
fi
done
if [ $have_repology = yes ]; then
systems="$systems repology"
fi
system=
# Show using inline tabs
export RST_INDENT=" "
for system in $systems; do
system_package_file="$PKG_DISTROS"/$system.txt
system_packages="$(echo $(sed 's/#.*//;' $system_package_file))"
case $system in
debian)
# Generic
echo "Debian/Ubuntu:"
;;
fedora)
# Generic
echo "Fedora/Redhat/CentOS:"
;;
repology)
;;
*)
echo "$system:"
;;
alpine) tab "Alpine";;
arch) tab "Arch Linux";;
conda) tab "conda-forge";;
cygwin) tab "Cygwin";;
debian) tab "Debian/Ubuntu";;
fedora) tab "Fedora/Redhat/CentOS";;
freebsd) tab "FreeBSD";;
gentoo) tab "Gentoo Linux";;
homebrew) tab "Homebrew";;
macports) tab "MacPorts";;
nix) tab "Nixpkgs";;
openbsd) tab "OpenBSD";;
opensuse) tab "openSUSE";;
slackware) tab "Slackware";;
void) tab "Void Linux";;
repology) ;;
*) tab "$system";;
esac
sage-print-system-package-command $system --wrap --prompt=' $ ' --continuation=' ' --sudo install $system_packages
if [ -n "$system_packages" ]; then
sage-print-system-package-command $system --wrap --prompt="$RST_INDENT"' $ ' --continuation="$RST_INDENT"' ' --sudo install $system_packages
else
echo
echo "${RST_INDENT}No package needed."
fi
echo
done
unset RST_INDENT
if [ $have_repology = yes ]; then
# Show below the inline tabs
system=repology
system_package_file="$PKG_DISTROS"/$system.txt
system_packages="$(echo $(sed 's/#.*//;' $system_package_file))"
sage-print-system-package-command $system --wrap --prompt=' $ ' --continuation=' ' --sudo install $system_packages
fi
if [ -z "$system" ]; then
echo "(none known)"
else
Expand Down
1 change: 0 additions & 1 deletion build/pkgs/calver/distros/package-version.txt

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/sagemath_doc_html/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sagelib sphinx sphinx_copybutton pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets jupyter_sphinx sage_docbuild elliptic_curves furo fpylll
sagelib sphinx sphinx_copybutton sphinx_inline_tabs pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets jupyter_sphinx sage_docbuild elliptic_curves furo fpylll

# Building the documentation has many dependencies, because all
# documented modules are imported and because we use matplotlib to
Expand Down
16 changes: 16 additions & 0 deletions build/pkgs/sphinx_inline_tabs/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
sphinx_inline_tabs: Add inline tabbed content to your Sphinx documentation.
===========================================================================

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

Add inline tabbed content to your Sphinx documentation.

License
-------

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

https://pypi.org/project/sphinx-inline-tabs/

5 changes: 5 additions & 0 deletions build/pkgs/sphinx_inline_tabs/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinx_inline_tabs-VERSION-py3-none-any.whl
sha1=1404e320d0533280355e7e1e71cffd9937015027
md5=7373d0ebd34be8f9ac2ed62bc63f4582
cksum=2708358042
upstream_url=https://pypi.io/packages/py3/s/sphinx_inline_tabs/sphinx_inline_tabs-VERSION-py3-none-any.whl
4 changes: 4 additions & 0 deletions build/pkgs/sphinx_inline_tabs/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx | $(PYTHON_TOOLCHAIN) $(PYTHON)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/sphinx_inline_tabs/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx-inline-tabs
1 change: 1 addition & 0 deletions build/pkgs/sphinx_inline_tabs/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023.4.21
3 changes: 3 additions & 0 deletions build/pkgs/sphinx_inline_tabs/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SAGE_SPKG_CONFIGURE([sphinx_inline_tabs], [
SAGE_PYTHON_PACKAGE_CHECK([sphinx_inline_tabs])
])
1 change: 1 addition & 0 deletions build/pkgs/sphinx_inline_tabs/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ AC_ARG_ENABLE([doc],
AS_HELP_STRING([--disable-doc],
[disable build of the Sage documentation and packages depending on it]), [
dnl Disable packages needed for docbuilding
for pkg in sage_docbuild alabaster babel snowballstemmer imagesize sphinx sphinxcontrib_devhelp sphinxcontrib_jsmath sphinxcontrib_serializinghtml sphinxcontrib_applehelp sphinxcontrib_htmlhelp sphinxcontrib_qthelp sphinxcontrib_websupport jupyter_sphinx furo sphinx_copybutton mathjax sphinx_basic_ng; do
for pkg in sage_docbuild alabaster babel snowballstemmer imagesize sphinx sphinxcontrib_devhelp sphinxcontrib_jsmath sphinxcontrib_serializinghtml sphinxcontrib_applehelp sphinxcontrib_htmlhelp sphinxcontrib_qthelp sphinxcontrib_websupport jupyter_sphinx furo sphinx_copybutton sphinx_inline_tabs mathjax sphinx_basic_ng; do
AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval])
done
AS_VAR_IF([enableval], [no], [dnl Disable the docbuild by disabling the install tree for documentation
Expand Down
74 changes: 60 additions & 14 deletions src/doc/en/developer/github.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ https://github.com/alice/sage.

Next if you don't have a local Git repo of Sage, then start afresh `cloning
your fork
<https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository>`_::
<https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository>`_:

.. tab:: By HTTPS protocol

::

[alice@localhost ~]$ git clone https://github.com/alice/sage.git
Cloning into 'sage'...
Expand All @@ -139,7 +143,30 @@ your fork
origin https://github.com/alice/sage.git (fetch)
origin https://github.com/alice/sage.git (push)

If you already have a local Git repo and only want to link your fork as ``origin`` remote, then do::
.. tab:: By SSH protocol

::

[alice@localhost ~]$ git clone [email protected]:alice/sage.git
Cloning into 'sage'...
remote: Enumerating objects: 914565, done.
remote: Counting objects: 100% (2738/2738), done.
remote: Compressing objects: 100% (855/855), done.
remote: Total 914565 (delta 1950), reused 2493 (delta 1875), pack-reused 911827
Receiving objects: 100% (914565/914565), 331.09 MiB | 11.22 MiB/s, done.
Resolving deltas: 100% (725438/725438), done.
Updating files: 100% (9936/9936), done.
[alice@localhost ~]$ cd sage
[alice@localhost sage]$ git remote -v
origin [email protected]:alice/sage.git (fetch)
origin [email protected]:alice/sage.git (push)


If you already have a local Git repo and only want to link your fork as ``origin`` remote, then do:

.. tab:: By HTTPS protocol

::

[alice@localhost sage]$ git remote add origin https://github.com/alice/sage.git
[alice@localhost sage]$ git remote -v
Expand All @@ -155,7 +182,29 @@ If you already have a local Git repo and only want to link your fork as ``origin
From https://github.com/alice/sage
* [new branch] develop -> origin/develop

You also add the Sage repo ``sagemath/sage`` as your remote ``upstream``::
.. tab:: By SSH protocol

::

[alice@localhost sage]$ git remote add origin [email protected]:alice/sage.git
[alice@localhost sage]$ git remote -v
origin [email protected]:alice/sage.git (fetch)
origin [email protected]:alice/sage.git (push)
[alice@localhost sage]$ git fetch origin
remote: Enumerating objects: 1136, done.
remote: Counting objects: 100% (1084/1084), done.
remote: Compressing objects: 100% (308/308), done.
remote: Total 1136 (delta 825), reused 982 (delta 776), pack-reused 52
Receiving objects: 100% (1136/1136), 2.62 MiB | 5.30 MiB/s, done.
Resolving deltas: 100% (838/838), completed with 145 local objects.
From [email protected]:alice/sage
* [new branch] develop -> origin/develop

You also add the Sage repo ``sagemath/sage`` as your remote ``upstream``:

.. tab:: By HTTPS protocol

::

[alice@localhost sage]$ git remote add upstream https://github.com/sagemath/sage.git
[alice@localhost sage]$ git remote -v
Expand All @@ -164,19 +213,16 @@ You also add the Sage repo ``sagemath/sage`` as your remote ``upstream``::
upstream https://github.com/sagemath/sage.git (fetch)
upstream https://github.com/sagemath/sage.git (push)

.. tab:: By SSH protocol

.. NOTE::

If you linked your Git to GitHub by SSH protocol, then do the following
instead to set up remotes::
::

[alice@localhost sage]$ git remote add origin [email protected]:alice/sage.git
[alice@localhost sage]$ git remote add upstream [email protected]:sagemath/sage.git
[alice@localhost sage]$ git remote -v
origin [email protected]:alice/sage.git (fetch)
origin [email protected]:alice/sage.git (push)
upstream [email protected]:sagemath/sage.git (fetch)
upstream [email protected]:sagemath/sage.git (push)
[alice@localhost sage]$ git remote add upstream [email protected]:sagemath/sage.git
[alice@localhost sage]$ git remote -v
origin [email protected]:alice/sage.git (fetch)
origin [email protected]:alice/sage.git (push)
upstream [email protected]:sagemath/sage.git (fetch)
upstream [email protected]:sagemath/sage.git (push)

To prevent accidental pushes to ``upstream`` (instead of ``origin``), you may want to disable it by running::

Expand Down
Loading