Skip to content

Commit fd93be8

Browse files
author
Release Manager
committed
Trac #32406: Make "./configure --enable-editable" the default
This has been available since 9.3, has been improved in 9.4 and in the 9.7 series (#33855), and is ready for general consumption Introduction: - https://wiki.sagemath.org/ReleaseTours/sage-9.3#Editable_.28.22in- place.22.2C_.22develop.22.29_installs_of_the_Sage_library Discussion: - https://groups.google.com/g/sage-devel/c/0GV8_O1VwbI URL: https://trac.sagemath.org/32406 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): John Palmieri
2 parents dcd778b + a911e0f commit fd93be8

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ in the Installation Guide.
304304
where `SAGE_LOCAL` is the desired installation prefix, which
305305
must be writable by the user.
306306

307+
If you use this option in combination with `--disable-editable`,
308+
you can delete the entire Sage source tree after completing
309+
the build process. What is installed in `SAGE_LOCAL` will be
310+
a self-contained installation of Sage.
311+
307312
- Note that in Sage's build process, `make` builds **and**
308313
installs (`make install` is a no-op). Therefore the
309314
installation hierarchy must be writable by the user.
@@ -321,19 +326,7 @@ in the Installation Guide.
321326

322327
$ ./configure --help
323328

324-
Some notable options for Sage developers are the following:
325-
326-
- Use `./configure --enable-editable` to configure the Sage distribution
327-
to install the Sage library in "develop" ("editable", "in-place") mode
328-
instead of using the Sage library's custom incremental build system.
329-
330-
It has the benefit that to try out changes to Python files, one does not
331-
need to run `./sage -b` any more; restarting Sage is enough. It may also
332-
have benefits in certain develop environments that get confused by
333-
sagelib's custom build system.
334-
335-
Note that in an editable install, the source directory will be cluttered
336-
with build artifacts (but they are `.gitignored`). This is normal.
329+
A notable option for Sage developers is the following:
337330

338331
- Use `./configure --enable-download-from-upstream-url` to allow
339332
downloading packages from their upstream URL if they cannot (yet) be

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ AC_ARG_ENABLE([debug],
127127
AC_ARG_VAR(SAGE_DEBUG, controls debugging support: "no" debugging; debugging "symbols" (default); build debug version ("yes"))
128128

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

134135
# Check whether we are on a supported platform

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ ENV MAKEFLAGS $MAKEFLAGS
168168
ARG SAGE_NUM_THREADS="2"
169169
ENV SAGE_NUM_THREADS $SAGE_NUM_THREADS
170170
RUN make configure
171-
RUN ./configure
171+
# Old default before https://trac.sagemath.org/ticket/32406
172+
RUN ./configure --disable-editable
172173
RUN make build
173174

174175
################################################################################

src/MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ prune .tox
77

88
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
99
prune sage_setup
10+
prune sage_docbuild
11+
prune doc

src/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
# ## Configuration
5151
# ########################################################
5252

53-
if len(sys.argv) > 1 and (sys.argv[1] == "sdist" or sys.argv[1] == "egg_info"):
53+
if len(sys.argv) > 1 and (sys.argv[1] in ["sdist", "egg_info", "dist_info"]):
5454
sdist = True
5555
else:
5656
sdist = False

0 commit comments

Comments
 (0)