how to turn docbuild off with conda

195 views
Skip to first unread message

Martin R

unread,
May 1, 2026, 4:28:07 AMMay 1
to sage-devel
Dear all,

Using the "classical" install, I can do "configure --disable-doc" so docs are not build and recompilation is reasonably fast.

How can I do this in a conda install.  When I start sage, it tells me

../../src/doc/meson.build:5: WARNING: Documentation building enabled, generating targets may be slow. To disable this, pass -Dbuild-docs=false. 

but I do not understand how I can pass this option.  I tried

(sage-dev) martin@toolbox:~/sage-trac$ meson configure -Dbuild-docs=False

ERROR: No valid build directory found, cannot modify options.

Best wishes,

Martin

Antonio Rojas

unread,
May 1, 2026, 4:49:56 AMMay 1
to sage-devel
meson setup your-build-dir -Dbuild-docs=False

Martin R

unread,
May 1, 2026, 5:30:52 AMMay 1
to sage-devel
:-(  this did not work.

I'm not completely sure what my your-build-dir is, I was guessing "build" in the root dir of my sage.  Or is it

 meson-python: building sagemath: /home/martin/miniforge3/envs/sage-dev/bin/ninja

?

Dima Pasechnik

unread,
May 1, 2026, 9:02:21 AMMay 1
to sage-...@googlegroups.com
Replace "your-build-dir" by something like "build/sagenodoc"

Tobia...@gmx.de

unread,
May 1, 2026, 4:13:16 PMMay 1
to sage-devel
You simply use pip to install sage, right?

In this case,  `pip install <other args> -Csetup-args=" -Dbuild-docs=False" .` should work.

Martin R

unread,
May 2, 2026, 6:40:00 AMMay 2
to sage-devel
I did not install sage myself - Julian did it for me on sagedays.  It looked easy back then (in January 2026), but I do not have any recollection of the details.  Some apps are asking me for my password once a month lest I forget, maybe I should reinstall sage from scratch once a month, too :-)

@Dima: I tried.  This creates a new directory build/sagenodoc.  However, doing "./sage" then wants to build the docs again.

@Tobias: how can I find out what <other args> were, assuming that it was a pip install? 

Martin

Tobia...@gmx.de

unread,
May 2, 2026, 3:47:54 PMMay 2
to sage-devel

pip install --no-build-isolation --editable -Csetup-args="-Dbuild-docs=False" .

Martin R

unread,
May 2, 2026, 7:52:07 PMMay 2
to sage-devel
This gives me

(sage-dev) martin@toolbox:~/sage-trac$ pip install --no-build-isolation --editable -Csetup-args="-Dbuild-docs=False" .
ERROR: -Csetup-args=-Dbuild-docs=False is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+ht
tp, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-h
ttp, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

Tobia...@gmx.de

unread,
May 3, 2026, 6:37:43 AMMay 3
to sage-devel
Sorry, the other way around:

pip install -Csetup-args="-Dbuild-docs=False" --no-build-isolation --editable .

(I'm not at my development machine, so cannot test)

Martin R

unread,
May 3, 2026, 7:34:15 AMMay 3
to sage-devel
Cool, this worked essentially!

Essentially, because apparently this command turned off another option that controlled output what meson is doing - i.e., recompiling stuff.

https://doc.sagemath.org/html/en/installation/source.html says that I should pass "--verbose" to pip install, but apparently this controls the verbosity of pip, not of meson.

Martin

Tobia...@gmx.de

unread,
May 3, 2026, 4:53:04 PMMay 3
to sage-devel
You also need to pass  -Ceditable-verbose=true

If you have the time, could you please create a PR that adds a short description of those two options to the documentation? Thanks in advance!

Martin R

unread,
May 6, 2026, 5:53:13 AM (14 days ago) May 6
to sage-devel

(draft, because I have to double check at home whether the instruction is correct)

Martin

Tobia...@gmx.de

unread,
May 6, 2026, 6:30:53 PM (13 days ago) May 6
to sage-devel
Thanks!

Vincent Macri

unread,
May 8, 2026, 11:04:40 AM (12 days ago) May 8
to sage-...@googlegroups.com
On a similar topic, how do you turn ccache ON with conda?

Tobia...@gmx.de

unread,
May 9, 2026, 12:53:52 AM (11 days ago) May 9
to sage-devel
I think 
            export CC="ccache $CC"
            export CXX="ccache $CXX"
should do the trick.
Reply all
Reply to author
Forward
0 new messages