annotate setup.py @ 1:643c1f11ad9b

CLI
author Jeff Hammel <k0scist@gmail.com>
date Mon, 03 Mar 2014 18:33:32 -0800
parents ee1c34d2f1c4
children aa57b8f607bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 """
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2 setup packaging script for abbrev
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 """
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 import os
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7 version = "0.0"
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
8 dependencies = ['MakeItSo', 'webob']
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
9
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
10 # allow use of setuptools/distribute or distutils
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
11 kw = {}
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
12 try:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
13 from setuptools import setup
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
14 kw['entry_points'] = """
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
15 [console_scripts]
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
16 abbrev = abbrev.main:main
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
17 abbrev-template = abbrev.template:main
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
18 """
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
19 kw['install_requires'] = dependencies
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
20 except ImportError:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
21 from distutils.core import setup
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
22 kw['requires'] = dependencies
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
23
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
24 try:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
25 here = os.path.dirname(os.path.abspath(__file__))
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
26 description = file(os.path.join(here, 'README.txt')).read()
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
27 except IOError:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
28 description = ''
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
29
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
30
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
31 setup(name='abbrev',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
32 version=version,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
33 description="abbreviate lists of words to e.g. single-letter switches",
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
34 long_description=description,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
35 classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
36 author='Jeff Hammel',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
37 author_email='k0scist@gmail.com',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
38 url='http://k0s.org/hg/abbrev',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
39 license='',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
40 packages=['abbrev'],
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
41 include_package_data=True,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
42 zip_safe=False,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
43 **kw
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
44 )
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
45