Changeset 6974

Show
Ignore:
Timestamp:
01/02/07 22:18:37 (23 months ago)
Author:
jburke
Message:

Removing docs and website tasks since they are no longer useful. No more -Ddocless=true now for builds.

Location:
trunk/buildscripts
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/buildscripts/build.xml

    r6946 r6974  
    225225        <!-- end -fix-config task --> 
    226226 
    227         <!-- website task --> 
    228         <!-- 
    229                 FIXME:  need to build docs here and copy the HTML files generated from 
    230                                 reST to website/docs/ 
    231         --> 
    232         <target name="website" 
    233                 depends="-fix-config" 
    234                 description="'builds' the website and moves files into the correct directory, taking care to ensure that file permissions are correct"> 
    235  
    236                 <copy todir="${release_website_dir}" overwrite="true"> 
    237                         <fileset dir="${website_dir}"> 
    238                                 <exclude name="**/.svn*" /> 
    239                                 <include name="**/*" /> 
    240                         </fileset> 
    241                 </copy> 
    242                 <antcall target="docs" /> 
    243                 <copy todir="${release_website_dir}/docs/" overwrite="true"> 
    244                         <fileset dir="${release_docs_dir}"> 
    245                                 <exclude name="**/.svn*" /> 
    246                                 <include name="*.html" /> 
    247                         </fileset> 
    248                 </copy> 
    249                 <chgrp group="www" type="both"> 
    250                         <fileset dir="${release_website_dir}" followsymlinks="false" includes="**/**" /> 
    251                 </chgrp> 
    252                 <chmod perm="g+rwx" type="dir"> 
    253                         <fileset dir="${release_website_dir}" followsymlinks="false" includes="**/**" /> 
    254                 </chmod> 
    255                 <chmod perm="g+rw" type="file"> 
    256                         <fileset dir="${release_website_dir}" followsymlinks="false" includes="**/**" /> 
    257                 </chmod> 
    258         </target> 
    259         <!-- end website task --> 
    260  
    261         <!-- FIXME: need to fix this task!! --> 
    262         <!-- docs task --> 
    263         <target name="docs" 
    264                 unless="docless" 
    265                 depends="-fix-config" 
    266                 description="'builds' the docs"> 
    267                 <!-- first, clobber the docs directory and rebuild it --> 
    268                 <!-- 
    269                         FIXME: how best can we check for staleness here? Shouldn't Ant be 
    270                         doing this for us? Clobbering entire dirs seems a little 
    271                         heavyweight. 
    272                 --> 
    273                 <delete dir="${release_docs_dir}"/> 
    274                 <mkdir dir="${release_docs_dir}" /> 
    275                 <mkdir dir="${release_docs_dir}/requirements" /> 
    276                 <script language="jython" taskName="docs"> 
    277                         <![CDATA[ 
    278 import sys 
    279 # make the python standard library avialable 
    280 sys.path.append(project.resolveFile("lib/pyLib.zip").getPath()) 
    281 sys.path.append(project.resolveFile(".").getPath()) 
    282  
    283 # import re 
    284 import os 
    285 from buildUtil import * 
    286  
    287 buildRestFiles( dojo.getProperty("articles_dir"), 
    288                                 dojo.getProperty("release_docs_dir"), 
    289                                 dojo.getProperty("rest_style_sheet"), 
    290                                 dojo.getProperty("rest_files")) 
    291 ]]> 
    292                 </script> 
    293  
    294                 <!-- fix body tags --> 
    295                 <replaceregexp match="^&lt;body&gt;$" byline="true" 
    296                         replace="&lt;body class=&quot;docs&quot;&gt;" flags="g"> 
    297                         <fileset dir="${release_docs_dir}"> 
    298                                 <exclude name="**/.svn*" /> 
    299                                 <include name="**/*.html" /> 
    300                         </fileset> 
    301                 </replaceregexp> 
    302  
    303         </target> 
    304         <!-- end docs task --> 
    305  
    306227        <!-- api task --> 
    307228        <target name="api" 
     
    914835                <antcall target="buildFileStorageProvider" /> 
    915836 
    916                 <antcall target="-docs-and-tests" /> 
    917837                <antcall target="compress" /> 
    918838                <!-- <antcall target="intern-strings" /> --> 
     
    931851        <!-- end release task --> 
    932852 
    933         <target name="-docs-and-tests" 
    934                 unless="docless" 
    935                 description="builds docs, copies in tests, and constructs API outlines"> 
     853        <target name="api-prep" 
     854                description="Constructs API outlines"> 
    936855                <copy todir="${release_dir}/apis" includeEmptyDirs="false" preservelastmodified="true"> 
    937856                        <fileset dir="${root}/documents/apis"> 
     
    941860                        </fileset> 
    942861                </copy> 
    943  
    944                 <antcall target="docs" /> 
    945862        </target> 
    946863 
  • trunk/buildscripts/buildUtil.py

    r6929 r6974  
    5353        pfd.write(newContents) 
    5454        pfd.close() # flush is implicit 
    55  
    56 def buildRestFiles(docDir, docOutDir, styleSheetFile, restFiles=""): 
    57         docFiles = [] 
    58  
    59         # start in docDir and add all the reST files in the directory to the 
    60         # list 
    61         docDir = os.path.normpath(os.path.abspath(docDir)) 
    62         styleSheetFile = os.path.normpath(os.path.abspath(styleSheetFile)) 
    63         docOutDir = os.path.normpath(os.path.abspath(docOutDir)) 
    64  
    65         if not len(restFiles): 
    66                 docFiles = glob.glob1(docDir, "*.rest") 
    67         else: 
    68                 docFiles = map(lambda x: x.strip(), restFiles.split(",")) 
    69  
    70         for name in docFiles: 
    71                 x = docDir+os.sep+name 
    72                 if x.find(os.sep+".svn") == -1: 
    73                         # print x 
    74                         cmdStr = "rst2html.py --no-doc-info --no-doc-title --embed-stylesheet --stylesheet-path=%s %s %s" % \ 
    75                                 (styleSheetFile, x, docOutDir+os.sep+(name[0:-5])+".html") 
    76  
    77                         # I'd much rather be using popen3, but it doesn't appear to be 
    78                         # available from either the os.* or popen2.* modules in a useable 
    79                         # way. The source of popen2.py leads me to believe that this is an 
    80                         # underlying Java issue. 
    81                         os.system("echo `which rst2html.py`") 
    82                         os.system(cmdStr) 
    83                         # java.lang.Runtime.exec(??) 
    84  
    85         if not len(restFiles): 
    86                 for name in os.listdir(docDir): 
    87                         tn = os.path.normpath(docDir+os.sep+name) 
    88                         if os.path.isdir(tn) and not name == ".svn": 
    89                                 buildRestFiles(tn, docOutDir+os.sep+name, styleSheetFile) 
    9055 
    9156def norm(path):