mirror of
https://github.com/jazzband/django-authority.git
synced 2026-03-16 22:20:28 +00:00
Get rid of ancient bootstrap setup.
This commit is contained in:
parent
c713eb5419
commit
26ed10824d
4 changed files with 5 additions and 121 deletions
|
|
@ -1,8 +1,6 @@
|
|||
include AUTHORS
|
||||
include LICENSE
|
||||
include README.rst
|
||||
include buildout.cfg
|
||||
include bootstrap.py
|
||||
recursive-include authority/templates/authority *.html
|
||||
recursive-include authority/templates/admin *.html
|
||||
recursive-include authority/fixtures *.json
|
||||
|
|
|
|||
13
README.rst
13
README.rst
|
|
@ -22,21 +22,18 @@ Example
|
|||
|
||||
To get the example project running do:
|
||||
|
||||
- Bootstrap the buildout by running::
|
||||
- Bootstrap the environment by running in a virtualenv::
|
||||
|
||||
python bootstrap.py
|
||||
|
||||
- Get the required packages by running::
|
||||
|
||||
bin/buildout
|
||||
pip install Django
|
||||
pip install -e .
|
||||
|
||||
- Sync the database::
|
||||
|
||||
bin/django-trunk syncdb
|
||||
python example/manage.py migrate
|
||||
|
||||
- Run the development server and visit the admin at http://127.0.0.1:8000/admin/::
|
||||
|
||||
bin/django-trunk runserver
|
||||
python example/manage.py runserver
|
||||
|
||||
Now create a flatage and open it to see some of the templatetags in action.
|
||||
Don't hesitate to use the admin to edit the permission objects.
|
||||
|
|
|
|||
84
bootstrap.py
84
bootstrap.py
|
|
@ -1,84 +0,0 @@
|
|||
##############################################################################
|
||||
#
|
||||
# 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$
|
||||
"""
|
||||
|
||||
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 len(sys.argv) > 2 and sys.argv[1] == '--version':
|
||||
VERSION = ' == %s' % sys.argv[2]
|
||||
args = sys.argv[3:] + ['bootstrap']
|
||||
else:
|
||||
VERSION = ''
|
||||
args = sys.argv[1:] + ['bootstrap']
|
||||
|
||||
if is_jython:
|
||||
import subprocess
|
||||
|
||||
assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
|
||||
quote(tmpeggs), 'zc.buildout' + VERSION],
|
||||
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' + VERSION,
|
||||
dict(os.environ,
|
||||
PYTHONPATH=
|
||||
ws.find(pkg_resources.Requirement.parse('setuptools')).location
|
||||
),
|
||||
) == 0
|
||||
|
||||
ws.add_entry(tmpeggs)
|
||||
ws.require('zc.buildout' + VERSION)
|
||||
import zc.buildout.buildout
|
||||
zc.buildout.buildout.main(args)
|
||||
shutil.rmtree(tmpeggs)
|
||||
27
buildout.cfg
27
buildout.cfg
|
|
@ -1,27 +0,0 @@
|
|||
[buildout]
|
||||
parts =
|
||||
python
|
||||
django-1.0.X
|
||||
django-1.1.X
|
||||
develop = .
|
||||
eggs =
|
||||
django-authority
|
||||
|
||||
[python]
|
||||
recipe = zc.recipe.egg
|
||||
interpreter = python
|
||||
eggs = ${buildout:eggs}
|
||||
|
||||
[django-1.0.X]
|
||||
recipe = djangorecipe
|
||||
version = 1.0.4
|
||||
projectegg = example
|
||||
settings = development
|
||||
eggs = ${buildout:eggs}
|
||||
|
||||
[django-1.1.X]
|
||||
recipe = djangorecipe
|
||||
version = 1.1.1
|
||||
projectegg = example
|
||||
settings = development
|
||||
eggs = ${buildout:eggs}
|
||||
Loading…
Reference in a new issue