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

Commit

Permalink
Merge #32406
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jul 22, 2022
2 parents 970c9d9 + a911e0f commit 6c1e4f9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ in the Installation Guide.
where `SAGE_LOCAL` is the desired installation prefix, which
must be writable by the user.

If you use this option in combination with `--disable-editable`,
you can delete the entire Sage source tree after completing
the build process. What is installed in `SAGE_LOCAL` will be
a self-contained installation of Sage.

- Note that in Sage's build process, `make` builds **and**
installs (`make install` is a no-op). Therefore the
installation hierarchy must be writable by the user.
Expand All @@ -321,19 +326,7 @@ in the Installation Guide.

$ ./configure --help

Some notable options for Sage developers are the following:

- Use `./configure --enable-editable` to configure the Sage distribution
to install the Sage library in "develop" ("editable", "in-place") mode
instead of using the Sage library's custom incremental build system.

It has the benefit that to try out changes to Python files, one does not
need to run `./sage -b` any more; restarting Sage is enough. It may also
have benefits in certain develop environments that get confused by
sagelib's custom build system.

Note that in an editable install, the source directory will be cluttered
with build artifacts (but they are `.gitignored`). This is normal.
A notable option for Sage developers is the following:

- Use `./configure --enable-download-from-upstream-url` to allow
downloading packages from their upstream URL if they cannot (yet) be
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ AC_ARG_ENABLE([debug],
AC_ARG_VAR(SAGE_DEBUG, controls debugging support: "no" debugging; debugging "symbols" (default); build debug version ("yes"))

AC_ARG_ENABLE([editable],
[AS_HELP_STRING([--enable-editable],
[use an editable install of the Sage library])],
[AS_HELP_STRING([--disable-editable],
[do not use an editable install of the Sage library: changes to Python files will require "sage -b" to rebuild the Sage library])],
[AC_SUBST([SAGE_EDITABLE], [$enableval])],
[AC_SUBST([SAGE_EDITABLE], [yes])])

# Check whether we are on a supported platform
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ ENV MAKEFLAGS $MAKEFLAGS
ARG SAGE_NUM_THREADS="2"
ENV SAGE_NUM_THREADS $SAGE_NUM_THREADS
RUN make configure
RUN ./configure
# Old default before https://trac.sagemath.org/ticket/32406
RUN ./configure --disable-editable
RUN make build

################################################################################
Expand Down
2 changes: 2 additions & 0 deletions src/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ prune .tox

prune sage/ext/interpreters # In particular, __init__.py must not be present in the distribution; or sage_setup.autogen.interpreters.rebuild will not generate the code
prune sage_setup
prune sage_docbuild
prune doc
2 changes: 1 addition & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# ## Configuration
# ########################################################

if len(sys.argv) > 1 and (sys.argv[1] == "sdist" or sys.argv[1] == "egg_info"):
if len(sys.argv) > 1 and (sys.argv[1] in ["sdist", "egg_info", "dist_info"]):
sdist = True
else:
sdist = False
Expand Down

0 comments on commit 6c1e4f9

Please sign in to comment.