[Checkins] SVN: groktoolkit/trunk/ use the make command, as it is much more flexible that way

Jan-Wijbrand Kolman janwijbrand at gmail.com
Mon Feb 7 10:21:16 EST 2011


Log message for revision 120183:
  use the make command, as it is much more flexible that way

Changed:
  U   groktoolkit/trunk/buildout.cfg
  U   groktoolkit/trunk/doc/scripts/update-releaseinfo.py
  U   groktoolkit/trunk/documentation.cfg

-=-
Modified: groktoolkit/trunk/buildout.cfg
===================================================================
--- groktoolkit/trunk/buildout.cfg	2011-02-07 15:20:20 UTC (rev 120182)
+++ groktoolkit/trunk/buildout.cfg	2011-02-07 15:21:16 UTC (rev 120183)
@@ -12,11 +12,17 @@
 allow-picked-versions = false
 include-site-packages = false
 auto-checkout =
+  grokcore.view
+  grokcore.component
 
 [checkversions]
 recipe = z3c.recipe.scripts
 eggs = z3c.checkversions [buildout]
 
+[sources]
+grokcore.component = svn svn+ssh://svn.zope.org/repos/main/grokcore.component/trunk
+grokcore.view = svn svn+ssh://svn.zope.org/repos/main/grokcore.view/branches/sylvain-template-inheritance-fix
+
 [depgraph]
 recipe = z3c.recipe.depgraph
 eggs = ${grok:packages}
@@ -44,6 +50,7 @@
 # that are defined in zc.catalog, including a hoist of (deprecated)
 # zope.app.* dependencies.
   zc.catalog
+  fanstatic
 eggs = zope.testrunner
 runner-defaults = ['--tests-pattern', '^f?tests$', '-v']
 

Modified: groktoolkit/trunk/doc/scripts/update-releaseinfo.py
===================================================================
--- groktoolkit/trunk/doc/scripts/update-releaseinfo.py	2011-02-07 15:20:20 UTC (rev 120182)
+++ groktoolkit/trunk/doc/scripts/update-releaseinfo.py	2011-02-07 15:21:16 UTC (rev 120183)
@@ -11,6 +11,7 @@
 import sys
 import urllib2
 import xml.etree.ElementTree
+import pkg_resources
 
 socket.setdefaulttimeout(10)
 
@@ -39,7 +40,6 @@
 
 DOAP_NS = 'http://usefulinc.com/ns/doap#'
 GROKTOOLKIT_ROOT = py.path.svnurl('http://svn.zope.org/repos/main/groktoolkit')
-TAGS_URL = GROKTOOLKIT_ROOT/'tags'
 
 def package_list(
         packages, config, out, line=PACKAGE_LINE):
@@ -68,56 +68,49 @@
     result = filter(None, map(str.strip, result))
     return result
 
-def get_releases():
-    tags = TAGS_URL.listdir()
-    tags.reverse()
-    releases = []
-    for tag in tags:
-        releases.append((tag.basename, tag))
-        break
-    return releases
+def write_package_list(path, version, use_trunk=False):
+    location = GROKTOOLKIT_ROOT / ('tags/%s' % version)
+    if use_trunk:
+        location = GROKTOOLKIT_ROOT / 'trunk'
 
-def write_package_lists(releases, path):
-    for release, location in releases:
-        print 'Writing package list for "%s"' % release
+    print 'Writing package list for Grok Toolkit "%s"' % version, location
 
-        config = ConfigParser.RawConfigParser()
-        config.optionxform = str
-        fp = StringIO.StringIO((location/'grok.cfg').read())
-        config.readfp(fp)
+    config = ConfigParser.RawConfigParser()
+    config.optionxform = str
+    fp = StringIO.StringIO((location/'grok.cfg').read())
+    config.readfp(fp)
+    output = open(path, 'w')
 
-        output = open(os.path.join(path, 'packages-%s.rst' % release), 'w')
+    print >>output, GENERATED_WARNING
 
-        print >>output, GENERATED_WARNING
+    heading = 'Grok %s packages' % version
+    print >>output, '=' * len(heading)
+    print >>output, heading
+    print >>output, '=' * len(heading)
 
-        heading = 'Grok %s packages' % release
-        print >>output, '=' * len(heading)
-        print >>output, heading
-        print >>output, '=' * len(heading)
+    ztk_version = '1.1'
+    print >>output, 'Zope Toolkit %s' % ztk_version
+    print >>output, '------------------------------'
+    print >>output, '`Overview of ZTK-%s <http://docs.zope.org/zopetoolkit/releases/overview-%s.html>`' % (ztk_version, ztk_version)
 
-        ztk_version = '1.1'
-        print >>output, 'Zope Toolkit %s' % ztk_version
-        print >>output, '------------------------------'
-        print >>output, '`Overview of ZTK-%s <http://docs.zope.org/zopetoolkit/releases/overview-%s.html>`' % (ztk_version, ztk_version)
+    print >>output, 'Packages'
+    print >>output, '--------'
+    included = packages(config, 'included')
+    package_list(included, config, output)
 
-        print >>output, 'Packages'
-        print >>output, '--------'
-        included = packages(config, 'included')
-        package_list(included, config, output)
+    deprecating = packages(config, 'deprecating')
+    if deprecating:
+        print >>output, 'Deprecating'
+        print >>output, '-----------'
+        package_list(deprecating, versions, output)
 
-        deprecating = packages(config, 'deprecating')
-        if deprecating:
-            print >>output, 'Deprecating'
-            print >>output, '-----------'
-            package_list(deprecating, versions, output)
+    print >>output, 'Other dependencies'
+    print >>output, '------------------'
+    all = config.options('versions')
+    dependencies = (set(all) - set(included)) - set(deprecating)
+    package_list(dependencies, config, output)
+    output.close()
 
-        print >>output, 'Other dependencies'
-        print >>output, '------------------'
-        all = config.options('versions')
-        dependencies = (set(all) - set(included)) - set(deprecating)
-        package_list(dependencies, config, output)
-        output.close()
-
 def write_overview(releases, path):
     print "Writing overview"
 
@@ -163,7 +156,11 @@
         overview.close()
 
 if __name__ == '__main__':
-    releases = get_releases()
-    path = os.path.abspath(os.path.join('releases'))
-    write_package_lists(releases, path)
-    write_overview(releases, path)
+    path = os.path.abspath(os.path.join('packages.rst'))
+    dist = pkg_resources.get_distribution('groktoolkit')
+    use_trunk = False
+    if dist.precedence <= pkg_resources.DEVELOP_DIST:
+        use_trunk = True
+    write_package_list(path, dist.version, use_trunk=use_trunk)
+
+    #write_overview(releases, path)

Modified: groktoolkit/trunk/documentation.cfg
===================================================================
--- groktoolkit/trunk/documentation.cfg	2011-02-07 15:20:20 UTC (rev 120182)
+++ groktoolkit/trunk/documentation.cfg	2011-02-07 15:21:16 UTC (rev 120183)
@@ -1,9 +1,7 @@
 [buildout]
 extends = grok.cfg
 develop = .
-parts =
-  sphinxpython
-  generate_documentation
+parts = sphinxpython
 
 [sphinxpython]
 recipe = z3c.recipe.scripts
@@ -27,12 +25,6 @@
   martian
   py
 
-[generate_documentation]
-recipe = collective.recipe.sphinxbuilder
-source = ${buildout:directory}/doc
-build = ${buildout:directory}/doc/_build
-interpreter = ${buildout:bin-directory}/sphinxpython
-
 [cronjob-template]
 recipe = collective.recipe.template
 document_root = /var/www/html/grok/doc/dev
@@ -40,13 +32,9 @@
   #!/bin/bash
   cd ${buildout:directory}
   svn update
-
-  # `make clean` substitute
-  rm -rf build/*
-
-  # `make html` substitute
-  ./bin/generate_documentation
-
+  cd doc
+  make clean
+  make all
   if [ $? == 0 ]; then
       rm -rf ${:document_root}
       cp -rf ${buildout:directory}/doc/_build/html ${:document_root}



More information about the checkins mailing list