Skip to content

Commit 6f8c360

Browse files
author
Catherine Devlin
committed
Skeleton as created by modern-package-template
1 parent 5424324 commit 6f8c360

10 files changed

+891
-0
lines changed

HACKING.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Development setup
2+
=================
3+
4+
To create a buildout,
5+
6+
$ python bootstrap.py
7+
$ bin/buildout
8+
9+
Release HOWTO
10+
=============
11+
12+
To make a release,
13+
14+
1) Update release date/version in NEWS.txt and setup.py
15+
2) Run 'python setup.py sdist'
16+
3) Test the generated source distribution in dist/
17+
4) Upload to PyPI: 'python setup.py sdist register upload'
18+
5) Increase version in setup.py (for next release)
19+

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.rst
2+
include NEWS.txt

NEWS.txt

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. This is your project NEWS file which will contain the release notes.
2+
.. Example: http://www.python.org/download/releases/2.6/NEWS.txt
3+
.. The content of this file, along with README.rst, will appear in your
4+
.. project's PyPI page.
5+
6+
News
7+
====
8+
9+
0.2a1
10+
-----
11+
12+
*Release date: UNRELEASED*
13+
14+
* Example news entry for the in-development version
15+
16+
17+
0.1
18+
---
19+
20+
*Release date: 15-Mar-2010*
21+
22+
* Example news entry for a released version
23+

README.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This file requires editing
2+
==========================
3+
4+
Note to the author: Please add something informative to this README *before*
5+
releasing your software, as `a little documentation goes a long way`_. Both
6+
README.rst (this file) and NEWS.txt (release notes) will be included in your
7+
package metadata which gets displayed in the PyPI page for your project.
8+
9+
You can take a look at the README.txt of other projects, such as repoze.bfg
10+
(http://bfg.repoze.org/trac/browser/trunk/README.txt) for some ideas.
11+
12+
.. _`a little documentation goes a long way`: http://www.martinaspeli.net/articles/a-little-documentation-goes-a-long-way
13+
14+
Credits
15+
-------
16+
17+
- `Distribute`_
18+
- `Buildout`_
19+
- `modern-package-template`_
20+
21+
.. _Buildout: http://www.buildout.org/
22+
.. _Distribute: http://pypi.python.org/pypi/distribute
23+
.. _`modern-package-template`: http://pypi.python.org/pypi/modern-package-template

bootstrap.py

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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: bootstrap.py 102545 2009-08-06 14:49:47Z chrisw $
21+
"""
22+
23+
import os, shutil, sys, tempfile, urllib2
24+
from optparse import OptionParser
25+
26+
tmpeggs = tempfile.mkdtemp()
27+
28+
is_jython = sys.platform.startswith('java')
29+
30+
# parsing arguments
31+
parser = OptionParser()
32+
parser.add_option("-v", "--version", dest="version",
33+
help="use a specific zc.buildout version")
34+
parser.add_option("-d", "--distribute",
35+
action="store_true", dest="distribute", default=True,
36+
help="Use Disribute rather than Setuptools.")
37+
38+
options, args = parser.parse_args()
39+
40+
if options.version is not None:
41+
VERSION = '==%s' % options.version
42+
else:
43+
VERSION = ''
44+
45+
USE_DISTRIBUTE = options.distribute
46+
args = args + ['bootstrap']
47+
48+
to_reload = False
49+
try:
50+
import pkg_resources
51+
if not hasattr(pkg_resources, '_distribute'):
52+
to_reload = True
53+
raise ImportError
54+
except ImportError:
55+
ez = {}
56+
if USE_DISTRIBUTE:
57+
exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
58+
).read() in ez
59+
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
60+
else:
61+
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
62+
).read() in ez
63+
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
64+
65+
if to_reload:
66+
reload(pkg_resources)
67+
else:
68+
import pkg_resources
69+
70+
if sys.platform == 'win32':
71+
def quote(c):
72+
if ' ' in c:
73+
return '"%s"' % c # work around spawn lamosity on windows
74+
else:
75+
return c
76+
else:
77+
def quote (c):
78+
return c
79+
80+
cmd = 'from setuptools.command.easy_install import main; main()'
81+
ws = pkg_resources.working_set
82+
83+
if USE_DISTRIBUTE:
84+
requirement = 'distribute'
85+
else:
86+
requirement = 'setuptools'
87+
88+
if is_jython:
89+
import subprocess
90+
91+
assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
92+
quote(tmpeggs), 'zc.buildout' + VERSION],
93+
env=dict(os.environ,
94+
PYTHONPATH=
95+
ws.find(pkg_resources.Requirement.parse(requirement)).location
96+
),
97+
).wait() == 0
98+
99+
else:
100+
assert os.spawnle(
101+
os.P_WAIT, sys.executable, quote (sys.executable),
102+
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
103+
dict(os.environ,
104+
PYTHONPATH=
105+
ws.find(pkg_resources.Requirement.parse(requirement)).location
106+
),
107+
) == 0
108+
109+
ws.add_entry(tmpeggs)
110+
ws.require('zc.buildout' + VERSION)
111+
import zc.buildout.buildout
112+
zc.buildout.buildout.main(args)
113+
shutil.rmtree(tmpeggs)

buildout.cfg

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[buildout]
2+
parts = python scripts
3+
develop = .
4+
eggs = ipython-sql
5+
6+
[python]
7+
recipe = zc.recipe.egg
8+
interpreter = python
9+
eggs = ${buildout:eggs}
10+
11+
[scripts]
12+
recipe = zc.recipe.egg:scripts
13+
eggs = ${buildout:eggs}

ipython-sql.wpr

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!wing
2+
#!version=4.0
3+
##################################################################
4+
# Wing IDE project file #
5+
##################################################################
6+
[project attributes]
7+
proj.directory-list = [{'dirloc': loc('.'),
8+
'excludes': (),
9+
'filter': '*',
10+
'include_hidden': False,
11+
'recursive': True,
12+
'watch_for_changes': True}]
13+
proj.file-type = 'shared'

0 commit comments

Comments
 (0)