annotate setup.py @ 10:c782d750fd6d

comment
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 09:14:04 -0700
parents b3023ba3c9ca
children c0ba4f455fcd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 """
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2 setup packaging script for configuration
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 import os
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 version = "0.0"
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 dependencies = ['MakeItSo', 'PyYAML']
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 try:
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 import json
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 except ImportError:
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 dependencies.append('simplejson')
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
15 # allow use of setuptools/distribute or distutils
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
16 kw = {}
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17 try:
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
18 from setuptools import setup
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
19 kw['entry_points'] = """
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
20 [console_scripts]
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
21 configuration-template = configuration.template:main
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
22 """
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
23 kw['install_requires'] = dependencies
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
24 except ImportError:
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
25 from distutils.core import setup
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
26 kw['requires'] = dependencies
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
27
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
28 try:
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
29 here = os.path.dirname(os.path.abspath(__file__))
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
30 description = file(os.path.join(here, 'README.txt')).read()
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
31 except IOError:
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
32 description = ''
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
33
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
34
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
35 setup(name='configuration',
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
36 version=version,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
37 description="multi-level unified configuration",
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
38 long_description=description,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
39 classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
40 author='Jeff Hammel',
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
41 author_email='jhammel@mozilla.com',
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
42 url='http://k0s.org/mozilla/hg/configuration',
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
43 license='MPL',
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
44 packages=['configuration'],
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
45 include_package_data=True,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
46 zip_safe=False,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
47 **kw
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
48 )
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
49