annotate setup.py @ 2:aa57b8f607bd default tip

still doesnt work; lets find another
author Jeff Hammel <k0scist@gmail.com>
date Thu, 14 Jul 2016 12:17:35 -0700
parents ee1c34d2f1c4
children
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
2
aa57b8f607bd still doesnt work; lets find another
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
7 version = "0.1"
aa57b8f607bd still doesnt work; lets find another
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
8 dependencies = []
0
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 """
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
18 kw['install_requires'] = dependencies
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
19 except ImportError:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
20 from distutils.core import setup
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
21 kw['requires'] = dependencies
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
22
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
23 try:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
24 here = os.path.dirname(os.path.abspath(__file__))
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
25 description = file(os.path.join(here, 'README.txt')).read()
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
26 except IOError:
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
27 description = ''
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
28
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
29
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
30 setup(name='abbrev',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
31 version=version,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
32 description="abbreviate lists of words to e.g. single-letter switches",
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
33 long_description=description,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
34 classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
35 author='Jeff Hammel',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
36 author_email='k0scist@gmail.com',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
37 url='http://k0s.org/hg/abbrev',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
38 license='',
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
39 packages=['abbrev'],
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
40 include_package_data=True,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
41 zip_safe=False,
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
42 **kw
ee1c34d2f1c4 initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
43 )