Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit ce79954

Browse files
author
Matthias Koeppe
committed
build/pkgs/sage_setup_docbuild: New
1 parent 72c5040 commit ce79954

File tree

13 files changed

+83
-1
lines changed

13 files changed

+83
-1
lines changed

build/make/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ base: $(inst_patch) $(inst_pkgconf)
287287
# Building the documentation has many dependencies, because all
288288
# documented modules are imported and because we use matplotlib to
289289
# produce plots.
290-
DOC_DEPENDENCIES = sagelib $(inst_sphinx) \
290+
DOC_DEPENDENCIES = sagelib sage_setup_docbuild $(inst_sphinx) \
291291
| $(SAGERUNTIME) $(inst_maxima) $(inst_networkx) $(inst_scipy) $(inst_sympy) \
292292
$(inst_matplotlib) $(inst_pillow) $(inst_mathjax) $(inst_mpmath) \
293293
$(inst_ipykernel) $(inst_jupyter_client) $(inst_conway_polynomials) \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$(PYTHON) sagelib sphinx six | $(PYTHON_TOOLCHAIN)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../sagelib/package-version.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
cd src
3+
. sage-dist-helpers
4+
# We install directly with setuptools, not with pip, because pip does not handle our symlinks correctly.
5+
# An alternative would be to build an sdist and then to install the sdist using pip.
6+
sage-python23 -u setup.py --no-user-cfg install --single-version-externally-managed --root=/
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Script to prepare an sdist tarball for sage_setup
4+
# This script is not used during build.
5+
#
6+
# HOW TO MAKE THE TARBALL:
7+
# ./sage --sh build/pkgs/sage_setup_docbuild/spkg-src
8+
9+
if [ -z "$SAGE_ROOT" ] ; then
10+
echo >&2 "Error - SAGE_ROOT undefined ... exiting"
11+
echo >&2 "Maybe run 'sage -sh'?"
12+
exit 1
13+
fi
14+
15+
# Exit on failure
16+
set -e
17+
18+
cd build/pkgs/sage_setup_docbuild
19+
20+
cd src
21+
sage-python23 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# sage_setup.docbuild #
2+
3+
This is the build system of the Sage documentation, based on sphinx.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#sage
2+
sphinx
3+
six
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../src/sage_setup/docbuild
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[metadata]
2+
name = sage_setup.docbuild
3+
description = Sage: Open Source Mathematics Software: Build system of the Sage documentation
4+
long_description = file: README.md
5+
license = GNU General Public License (GPL) v2 or later
6+
author = The Sage Developers
7+
author_email = https://groups.google.com/group/sage-support
8+
url = https://www.sagemath.org
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
3+
from setuptools import setup, find_namespace_packages
4+
5+
setup(
6+
packages=find_namespace_packages()
7+
)
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# First pip-install tox:
2+
#
3+
# ./sage -pip install tox
4+
#
5+
# To build and test in the tox environment:
6+
#
7+
# ./sage -sh -c '(cd build/pkgs/sage_setup_docbuild/src && tox)'
8+
#
9+
# To test interactively:
10+
#
11+
# build/pkgs/sage_setup_docbuild/src/.tox/python/bin/python
12+
#
13+
[tox]
14+
15+
[testenv]
16+
deps = -rrequirements.txt
17+
18+
setenv =
19+
# Sage scripts like to use $HOME/.sage
20+
HOME={envdir}
21+
22+
whitelist_externals =
23+
bash
24+
25+
commands =
26+
# Beware of the treacherous non-src layout.
27+
#python -c 'import sys; "" in sys.path and sys.path.remove(""); import sage_setup.docbuild'
28+
29+
# TODO: Add tests after adding the dependency on sagelib to
30+
# requirements.txt

build/pkgs/sage_setup_docbuild/type

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
standard

src/sage_setup/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)