Skip to content

Commit cdcdb8f

Browse files
author
Matthias Koeppe
committed
README.md: Move all mentions of release tarballs to the installation guide
1 parent acbe15d commit cdcdb8f

File tree

3 files changed

+55
-31
lines changed

3 files changed

+55
-31
lines changed

README.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ in the Installation Guide.
131131
- On personal computers, any subdirectory of your :envvar:`HOME`
132132
directory should do.
133133

134-
- For example, you could use `SAGE_ROOT=~/sage/sage-x.y`, which we
135-
will use as the running example below, where `x.y` is the
136-
current Sage version.
134+
- For example, you could use `SAGE_ROOT=~/sage/sage`, which we
135+
will use as the running example below.
137136

138137
- You need at least 10 GB of free disk space.
139138

@@ -151,31 +150,19 @@ in the Installation Guide.
151150
capitalization when changing into :envvar:`SAGE_ROOT` can lead to build
152151
errors for dependencies requiring exact capitalization in path names.
153152

154-
2. Download/unpack or clone the sources.
153+
2. Clone the sources.
155154

156-
- Go to https://www.sagemath.org/download-source.html, select a mirror,
157-
and download the file :file:`sage-x.y.tar.gz`.
155+
- Create the directory where `SAGE_ROOT` should be established:
158156

159-
This compressed archive file contains the source code for Sage and
160-
the source for all programs on which Sage depends.
157+
$ mkdir -p ~/sage
158+
$ cd ~/sage
161159

162-
- After downloading the source tarball `sage-x.y.tar.gz` into
163-
`~/sage/`:
164-
165-
$ cd ~/sage/
166-
$ tar xf sage-x.y.tar.gz # adapt x.y; takes a while
167-
168-
This creates the subdirectory `sage-x.y`. Now change into it:
169-
170-
$ cd sage-x.y/ # adapt x.y
171-
172-
- [Git] Alternatively, and required for Sage development, clone the Sage
173-
git repository:
160+
- Clone the Sage git repository:
174161

175162
$ ORIG=https://github.com/sagemath/sage.git
176-
$ git clone -c core.symlinks=true --branch develop --tags $ORIG
163+
$ git clone -c core.symlinks=true --origin upstream --branch develop --tags $ORIG
177164

178-
This will create the directory `sage`. (See the section
165+
This will create the subdirectory `~/sage/sage`. (See the section
179166
[Setting up git](https://doc.sagemath.org/html/en/developer/git_setup.html)
180167
and the following sections in the Sage Developer's Guide
181168
for more information.)
@@ -190,11 +177,8 @@ in the Installation Guide.
190177
build will not work if Windows line endings rather than UNIX
191178
line endings are used.
192179

193-
Therefore it is crucial that you unpack the source tree from the
194-
WSL `bash` using the WSL `tar` utility and not using other
195-
Windows tools (including mingw). Likewise, when using `git`, it
196-
is recommended (but not necessary) to use the WSL version of
197-
`git`.
180+
Therefore it is recommended (but not necessary) to use the
181+
WSL version of `git`.
198182

199183
3. [Linux, WSL] Install the required minimal build prerequisites.
200184

@@ -473,7 +457,7 @@ Directory Layout
473457

474458
Simplified directory layout (only essential files/directories):
475459
```
476-
SAGE_ROOT Root directory (sage-x.y in Sage tarball)
460+
SAGE_ROOT Root directory (create by git clone)
477461
├── build
478462
│ └── pkgs Every package is a subdirectory here
479463
│ ├── 4ti2/

src/doc/en/developer/doctesting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ this syntax:
2626

2727
.. CODE-BLOCK:: text
2828
29-
/path/to/sage-x.y.z/sage -t [--long] /path/to/sage-x.y.z/path/to/module.py[x]
29+
/path/to/sage_root/sage -t [--long] /path/to/sage_root/path/to/module.py[x]
3030
3131
where ``--long`` is an optional argument (see :ref:`section-options`
3232
for more options). The version of ``sage`` used must match the version

src/doc/en/installation/source.rst

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,49 @@ Installation steps
387387
#. Follow the procedure in the file `README.md <https://github.com/sagemath/sage/#readme>`_
388388
in ``SAGE_ROOT``.
389389

390+
#. If you need wish to prepare for having to build Sage in an environment
391+
without sufficient Internet connectivity:
392+
393+
- After running ``configure``, you can use ``make download`` to force
394+
downloading packages before building. After this, the packages
395+
are in the subdirectory ``upstream``.
396+
397+
- Alternatively, instead of cloning the git repository, you
398+
can download a self-contained release tarball for any
399+
stable release from the Sage project's
400+
`GitHub Releases <https://github.com/sagemath/sage/releases>`_.
401+
Use the file named ``sage-x.y.tar.gz`` (1.25 GB as of Sage 10.2)
402+
in the Release Assets, which contains a prepopulated subdirectory
403+
``upstream``.
404+
405+
After downloading the source tarball ```sage-x.y.tar.gz``` into
406+
a directory ```~/sage/```::
407+
408+
$ cd ~/sage/
409+
$ tar xf sage-x.y.tar.gz # adapt x.y; takes a while
410+
411+
This creates the subdirectory `````sage-x.y```. Now change into it::
412+
413+
$ cd sage-x.y/ # adapt x.y
414+
415+
.. note::
416+
417+
On Windows, it is crucial that you unpack the source tree from the
418+
WSL `bash` using the WSL `tar` utility and not using other
419+
Windows tools (including mingw).
420+
421+
This is because the Sage source tree contains symbolic links, and the
422+
build will not work if Windows line endings rather than UNIX
423+
line endings are used.
424+
425+
- The Sage mirrors also provide such self-contained tarballs
426+
for all `stable releases <https://www.sagemath.org/download-source.html>`_
427+
and additionally for all `development releases
428+
<https://www.sagemath.org/download-latest.html>`_.
429+
390430
#. Additional remarks:
391431
You do not need to be logged in as root, since no files are
392-
changed outside of the :file:`sage-x.y` directory.
432+
changed outside of the :file:`SAGE_ROOT` directory.
393433
In fact, **it is inadvisable to build Sage as root**, as the root account
394434
should only be used when absolutely necessary and mistyped commands can have
395435
serious consequences if you are logged in as root.
@@ -504,7 +544,7 @@ Installation steps
504544
- Make a symbolic link from :file:`/usr/local/bin/sage` (or another
505545
directory in your :envvar:`PATH`) to :file:`$SAGE_ROOT/sage`::
506546

507-
$ ln -s /path/to/sage-x.y/sage /usr/local/bin/sage
547+
$ ln -s /path/to/sage_root/sage /usr/local/bin/sage
508548

509549
Now simply typing ``sage`` from any directory should be sufficient to run
510550
Sage.

0 commit comments

Comments
 (0)