[Checkins] SVN: buildout-website/trunk/ Add buildout support
Baiju M
baiju.m.mail at gmail.com
Sun Mar 29 12:43:00 EDT 2009
Log message for revision 98447:
Add buildout support
Changed:
_U buildout-website/trunk/
U buildout-website/trunk/Makefile
A buildout-website/trunk/bootstrap.py
A buildout-website/trunk/buildout.cfg
-=-
Property changes on: buildout-website/trunk
___________________________________________________________________
Added: svn:ignore
+ build
develop-eggs
bin
parts
.installed.cfg
Modified: buildout-website/trunk/Makefile
===================================================================
--- buildout-website/trunk/Makefile 2009-03-29 16:30:34 UTC (rev 98446)
+++ buildout-website/trunk/Makefile 2009-03-29 16:43:00 UTC (rev 98447)
@@ -3,7 +3,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
-SPHINXBUILD = sphinx-build
+SPHINXBUILD = bin/sphinx-build
PAPER =
# Internal variables.
@@ -11,12 +11,13 @@
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
-.PHONY: help clean html web htmlhelp latex changes linkcheck
+.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
- @echo " web to make files usable by Sphinx.web"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview over all changed/added/deprecated items"
@@ -31,14 +32,20 @@
@echo
@echo "Build finished. The HTML pages are in build/html."
-web:
- mkdir -p build/web build/doctrees
- $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) build/web
+pickle:
+ mkdir -p build/pickle build/doctrees
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
@echo
- @echo "Build finished; now you can run"
- @echo " python -m sphinx.web build/web"
- @echo "to start the server."
+ @echo "Build finished; now you can process the pickle files."
+web: pickle
+
+json:
+ mkdir -p build/json build/doctrees
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
htmlhelp:
mkdir -p build/htmlhelp build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
Added: buildout-website/trunk/bootstrap.py
===================================================================
--- buildout-website/trunk/bootstrap.py (rev 0)
+++ buildout-website/trunk/bootstrap.py 2009-03-29 16:43:00 UTC (rev 98447)
@@ -0,0 +1,77 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 90478 2008-08-27 22:44:46Z georgyberdyshev $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+is_jython = sys.platform.startswith('java')
+
+try:
+ import pkg_resources
+except ImportError:
+ ez = {}
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ import pkg_resources
+
+if sys.platform == 'win32':
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote (c):
+ return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
+
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+ quote(tmpeggs), 'zc.buildout'],
+ env=dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ).wait() == 0
+
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, quote (sys.executable),
+ '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Added: buildout-website/trunk/buildout.cfg
===================================================================
--- buildout-website/trunk/buildout.cfg (rev 0)
+++ buildout-website/trunk/buildout.cfg 2009-03-29 16:43:00 UTC (rev 98447)
@@ -0,0 +1,7 @@
+[buildout]
+parts = doc
+
+[doc]
+recipe = zc.recipe.egg
+eggs = sphinx>=0.6.1
+ docutils
More information about the Checkins
mailing list