Ticket #13245 (needs_review enhancement)
sage --clone: give option to not rebuild the docs
| Reported by: | jhpalmieri | Owned by: | leif |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-5.10 |
| Component: | scripts | Keywords: | |
| Cc: | nthiery, saliola, leif, hivert | Work issues: | |
| Report Upstream: | N/A | Reviewers: | |
| Authors: | John Palmieri | Merged in: | |
| Dependencies: | Stopgaps: |
Description (last modified by jhpalmieri) (diff)
With the attached patch, passing the argument -N to sage -clone says not to rebuild the reference manual. The patch also uses the option during the clone in the sage-combinat script: there are usually so many patches applied in the queue, it would make more sense to build the manual after applying the patches, not before.
Apply trac_13245-clone-nodocbuild.patch and trac_13245-clone-cython.patch.
Attachments
Change History
Changed 10 months ago by jhpalmieri
-
attachment
trac_13245-clone-docbuild.patch
added
comment:2 Changed 2 months ago by jhpalmieri
- Cc leif, hivert added
- Description modified (diff)
Here is a different patch; this one just turns off docbuilding in sage-clone altogether.
comment:3 follow-up: ↓ 4 Changed 6 days ago by leif
Ping.
Not directly related, but meanwhile sage-clone also regenerates all Cython-generated files, because we don't copy .cython_version, which is fixed by:
-
sage-clone
diff --git a/sage-clone b/sage-clone
a b 53 53 54 54 cpdir(os.path.abspath('sage/sage'), os.path.abspath(branch + '/sage')) 55 55 56 if os.path.isfile('sage/.cython_version'): 57 print "Copying over hidden Cython version file..." 58 os.link('sage/.cython_version', branch+'/.cython_version') 59 56 60 def copy_dtree(src_dir, dest_dir): 57 61 src_root = os.path.abspath(src_dir) 58 62 dest_root = os.path.abspath(dest_dir)
But there are other issues as well (e.g. rebuilding the fast_callable interpreters, which IMHO isn't necessary either).
comment:4 in reply to: ↑ 3 Changed 6 days ago by leif
Replying to leif:
But there are other issues as well (e.g. rebuilding the fast_callable interpreters, which IMHO isn't necessary either).
Oh, forgot: Cython-generated header files (*.h) don't contain a special comment on that on the first line (which is probably an upstream Cython bug), so the following currently doesn't work as expected either:
if ext in ['.h', '.c', '.cpp']: if 'Cython' in open(src + '/' + F).readline(): os.link(src + '/' + F, dest + '/' +F) os.utime(dest + '/' +F, None)
(For the moment, we could look for ^#ifndef __PYX_HAVE__sage__ in those, probably even without the sage__.)
comment:5 follow-up: ↓ 6 Changed 5 days ago by jhpalmieri
- Description modified (diff)
Okay, here is a patch to deal with the .h files and .cython_version. Rebuilding the fast_callable interpreters doesn't take too much time, so I'm not dealing with it right now. Leif, would you like to be listed as an author?
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 5 days ago by leif
Replying to jhpalmieri:
Rebuilding the fast_callable interpreters doesn't take too much time, so I'm not dealing with it right now.
Yes, but it also triggers the rebuild of (currently) at least one other Cython module (besides the newly generated five sage.ext.interpreters.wrapper_*.pyx):
... Building interpreters for fast_callable Updating Cython code.... Compiling sage/plot/plot3d/parametric_surface.pyx because it depends on ./sage/ext/interpreters/wrapper_rdf.pxd. ... building 'sage.plot.plot3d.parametric_surface' extension ...
(I think we could just copy over all files in sage/ext/interpreters/, which is in .hgignore.)
Note sure what or whether doc-rebuilding is triggered (upon next sage --docbuild ...) by rebuilding the interpreters though.
Could you explain why we "touch" almost all manually copied (more precisely, linked) files?
Leif, would you like to be listed as an author?
Does the patch introduce new environment variables? :P
[Haven't tried the patches here yet.]
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 5 days ago by leif
Replying to leif:
Could you explain why we "touch" almost all manually copied (more precisely, linked) files?
Ok, seems like Mercurial is to blame. We could use hg clone -U though instead, and create the working copy by ourselves. (Not tested.)
comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 5 days ago by leif
Replying to leif:
Replying to leif:
Could you explain why we "touch" almost all manually copied (more precisely, linked) files?
Ok, seems like Mercurial is to blame. We could use hg clone -U though instead, and create the working copy by ourselves. (Not tested.)
Or change back the modification times of the files (of the working copy) Mercurial created... ;-)
OMG.
comment:9 in reply to: ↑ 8 Changed 5 days ago by leif
Replying to leif:
Replying to leif:
Ok, seems like Mercurial is to blame. We could use hg clone -U though instead, and create the working copy by ourselves. (Not tested.)
Or change back the modification times of the files (of the working copy) Mercurial created... ;-)
OMG.
(How about making this optional?!?)
comment:10 Changed 5 days ago by leif
Since apparently hg archive (meanwhile?) doesn't preserve modification times either, we could use hg clone -U and some cp -pPR of hg manifest magic instead (of plain hg clone).
comment:11 follow-up: ↓ 12 Changed 4 days ago by jhpalmieri
Given the upcoming transition to git, I don't think it's worth trying to wrestle with Mercurial very much. I don't want to spend much more time on it, anyway.
comment:12 in reply to: ↑ 11 Changed 4 days ago by leif
Replying to jhpalmieri:
Given the upcoming transition to git, I don't think it's worth trying to wrestle with Mercurial very much. I don't want to spend much more time on it, anyway.
Yes, hopefully.
Anyway, the title (and parts of the description) still advertise an option to disable docbuilding, but the currently listed patch just disables it unconditionally. Which way do we want to go?
comment:13 Changed 4 days ago by jhpalmieri
I think it makes more sense not to build the docs at all. But I don't use sage --clone myself, I only opened this in response to experiences of various sage-combinat users.

scripts repo