Skip to content
This repository
Browse code

starter buildout/bootstrap

  • Loading branch information...
commit 402b22de89cee5804c1e063bc234c38dc7dbb5de 1 parent 3018202
Elizabeth Leddy eleddy authored

Showing 2 changed files with 192 additions and 0 deletions. Show diff stats Hide diff stats

  1. +84 0 bootstrap.py
  2. +108 0 buildout.cfg
84 bootstrap.py
... ... @@ -0,0 +1,84 @@
  1 +##############################################################################
  2 +#
  3 +# Copyright (c) 2006 Zope Corporation and Contributors.
  4 +# All Rights Reserved.
  5 +#
  6 +# This software is subject to the provisions of the Zope Public License,
  7 +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
  8 +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
  9 +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  10 +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
  11 +# FOR A PARTICULAR PURPOSE.
  12 +#
  13 +##############################################################################
  14 +"""Bootstrap a buildout-based project
  15 +
  16 +Simply run this script in a directory containing a buildout.cfg.
  17 +The script accepts buildout command-line options, so you can
  18 +use the -c option to specify an alternate configuration file.
  19 +
  20 +$Id$
  21 +"""
  22 +
  23 +import os, shutil, sys, tempfile, urllib2
  24 +
  25 +tmpeggs = tempfile.mkdtemp()
  26 +
  27 +is_jython = sys.platform.startswith('java')
  28 +
  29 +try:
  30 + import pkg_resources
  31 +except ImportError:
  32 + ez = {}
  33 + exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
  34 + ).read() in ez
  35 + ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
  36 +
  37 + import pkg_resources
  38 +
  39 +if sys.platform == 'win32':
  40 + def quote(c):
  41 + if ' ' in c:
  42 + return '"%s"' % c # work around spawn lamosity on windows
  43 + else:
  44 + return c
  45 +else:
  46 + def quote (c):
  47 + return c
  48 +
  49 +cmd = 'from setuptools.command.easy_install import main; main()'
  50 +ws = pkg_resources.working_set
  51 +
  52 +if len(sys.argv) > 2 and sys.argv[1] == '--version':
  53 + VERSION = '==%s' % sys.argv[2]
  54 + args = sys.argv[3:] + ['bootstrap']
  55 +else:
  56 + VERSION = ''
  57 + args = sys.argv[1:] + ['bootstrap']
  58 +
  59 +if is_jython:
  60 + import subprocess
  61 +
  62 + assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
  63 + quote(tmpeggs), 'zc.buildout' + VERSION],
  64 + env=dict(os.environ,
  65 + PYTHONPATH=
  66 + ws.find(pkg_resources.Requirement.parse('setuptools')).location
  67 + ),
  68 + ).wait() == 0
  69 +
  70 +else:
  71 + assert os.spawnle(
  72 + os.P_WAIT, sys.executable, quote (sys.executable),
  73 + '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
  74 + dict(os.environ,
  75 + PYTHONPATH=
  76 + ws.find(pkg_resources.Requirement.parse('setuptools')).location
  77 + ),
  78 + ) == 0
  79 +
  80 +ws.add_entry(tmpeggs)
  81 +ws.require('zc.buildout' + VERSION)
  82 +import zc.buildout.buildout
  83 +zc.buildout.buildout.main(args)
  84 +shutil.rmtree(tmpeggs)
108 buildout.cfg
... ... @@ -0,0 +1,108 @@
  1 +[buildout]
  2 +find-links =
  3 + http://pypi.pinaxproject.com/
  4 + http://pypi2.pinaxproject.com/
  5 +
  6 +versions = versions
  7 +parts =
  8 + zlib
  9 + PIL
  10 + interpreter
  11 +
  12 +unzip = true
  13 +eggs =
  14 + Django
  15 + Pinax
  16 + pip
  17 + BeautifulSoup
  18 + creole
  19 + PIL
  20 + Pygments
  21 + sorl
  22 + diff-match-patch
  23 + django-ajax-validation
  24 + django-announcements
  25 + django-app-plugins
  26 + django-atomformat
  27 + django-avatar
  28 + django-bookmarks
  29 + django-db-log
  30 + django-dbtemplates
  31 + django-email-confirmation
  32 + django-extensions
  33 + django-filter
  34 + django-flag
  35 + django-friends
  36 + django-frontendadmin
  37 + django-generic-flatblocks
  38 + django-locations
  39 + django-mailer
  40 + django-markup
  41 + django-messages
  42 + django-microblogging
  43 + django-notification
  44 + django-oembed
  45 + django-openid
  46 + django-pagination
  47 + django-photologue
  48 + django-robots
  49 + django-sorting
  50 + django-staticfiles
  51 + django-swaps
  52 + django-tagging
  53 + django-threadedcomments
  54 + django-timezones
  55 + django-uni-form
  56 + django-voting
  57 + django-wikiapp
  58 + docutils
  59 + elementtree
  60 + feedparser
  61 + gdata
  62 + geopy
  63 + ipython
  64 + python-dateutil
  65 + python-openid
  66 + python-twitter
  67 + python-yadis
  68 + pytz
  69 + simplejson
  70 + textile
  71 + vobject
  72 + ybrowserauth
  73 + template_utils
  74 +
  75 +[versions]
  76 +PIL = 1.1.6
  77 +pytz = 2009l
  78 +Django = 1.3.1
  79 +django-wikiapp = 0.2.0
  80 +django-sorting = 0.1
  81 +
  82 +# Build zlib for PIL, and PIL so we don't rely on something in the system
  83 +[zlib]
  84 +recipe = hexagonit.recipe.cmmi
  85 +url = http://www.zlib.net/zlib-1.2.6.tar.gz
  86 +configure-options = --shared
  87 +
  88 +[PIL]
  89 +recipe = zc.recipe.egg:custom
  90 +egg = PIL
  91 +find-links = http://dist.repoze.org/
  92 +include-dirs = ${zlib:location}/include
  93 +library-dirs = ${zlib:location}/lib
  94 +rpath = ${zlib:location}/lib
  95 +
  96 +[interpreter]
  97 +# A python interpreter with our eggs and libraries on its sys.path
  98 +recipe = zc.recipe.egg:scripts
  99 +eggs = ${buildout:eggs}
  100 +scripts =
  101 + python
  102 + ipython
  103 + pinax-admin
  104 + django-admin
  105 +entry-points =
  106 + pinax-admin=pinax.core.management:execute_from_command_line
  107 + django-admin=django.core.management:execute_from_command_line
  108 +interpreter = python

0 comments on commit 402b22d

Please sign in to comment.
Something went wrong with that request. Please try again.