#13245: sage --clone: do not rebuild the entire Sage library, and do not rebuild
the docs
-------------------------------------------------+--------------------------
       Reporter:  jhpalmieri                     |         Owner:  leif         
           Type:  defect                         |        Status:  needs_review 
       Priority:  blocker                        |     Milestone:  sage-5.10    
      Component:  scripts                        |    Resolution:               
       Keywords:                                 |   Work issues:               
Report Upstream:  N/A                            |     Reviewers:  John Palmieri
        Authors:  John Palmieri, Leif Leonhardy  |     Merged in:               
   Dependencies:                                 |      Stopgaps:               
-------------------------------------------------+--------------------------

Comment (by leif):

 Replying to [comment:50 leif]:
 > I ''think^TM^'' I know what the problem might be, namely the ''order''
 in which subdirectories of `devel/sage/build/` are copied.
 >
 > Since the odd addition of `build_dir` in `setup.py`, which already
 breaks `sage-sync-build`, the Cython-generated `.c` and `.cpp` files also
 end up below `build/`.
 >
 > Now if these get copied (and touched!) '''after''' their corresponding
 `.o` and `.so` files, the latter will get rebuilt.

 With
 {{{
 #!python
 def copy_dtree(src_dir, dest_dir):
     src_root = os.path.abspath(src_dir)
     dest_root = os.path.abspath(dest_dir)

     for root, dirs, files in os.walk(src_root):
         nroot = dest_root + root[len(src_root):]
         for d in dirs:
             os.makedirs(nroot+'/'+d)
         for f in files:
             if os.path.splitext(f)[1] in [".c",".cpp",".o",".so"]: # ADDED
                 print("  %s" % f) # ADDED
             os.link(root+'/'+f,nroot+'/'+f)
             os.utime(nroot+'/'+f, None)

 sys.stdout.flush(); sys.stderr.flush() # ADDED
 print "Copying over build directory..."
 copy_dtree('sage/build', branch + '/build')
 sys.stdout.flush(); sys.stderr.flush() # ADDED
 }}}
 I can at least confirm that ''for me'' all `.o` and `.so` files get copied
 ''after'' all `.c` and `.cpp` files have been copied -- rather
 incidentally I think.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13245#comment:52>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to