annotate setup.py @ 53:3691ffa84a3a

add to setup
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 May 2015 08:53:11 -0700
parents 8addd6e12b29
children 4576ccc3be76
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 """
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2 setup packaging script for TextShaper
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 import os
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 version = "0.0"
18
df52326aa08d start filling out options
Jeff Hammel <k0scist@gmail.com>
parents: 15
diff changeset
8 dependencies = ['webob', 'which']
0
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 # allow use of setuptools/distribute or distutils
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 kw = {}
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 try:
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 from setuptools import setup
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14 kw['entry_points'] = """
44
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
15 [console_scripts]
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
16 corenames = textshaper.corename:main
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
17 indent = textshaper.indent:main
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
18 onelineit = textshaper.onelineit:main
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
19 quote = textshaper.quote:main
53
3691ffa84a3a add to setup
Jeff Hammel <k0scist@gmail.com>
parents: 44
diff changeset
20 sentences = textshaper.split:main
44
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
21 textshaper = textshaper.main:main
8addd6e12b29 corename
Jeff Hammel <k0scist@gmail.com>
parents: 42
diff changeset
22 url2txt = textshaper.url2txt:main
0
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
23 """
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
24 kw['install_requires'] = dependencies
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
25 except ImportError:
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
26 from distutils.core import setup
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
27 kw['requires'] = dependencies
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
28
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
29 try:
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
30 here = os.path.dirname(os.path.abspath(__file__))
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
31 description = file(os.path.join(here, 'README.txt')).read()
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
32 except IOError:
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
33 description = ''
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
34
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
35
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
36 setup(name='TextShaper',
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
37 version=version,
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
38 description="package to shape text blocks ",
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
39 long_description=description,
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
40 classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
41 author='Jeff Hammel',
21
e6f680d25d63 migrate url2txt
Jeff Hammel <k0scist@gmail.com>
parents: 18
diff changeset
42 author_email='k0scist@gmail.com',
0
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
43 url='http://k0s.org/hg/TextShaper',
3
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
44 license='MPL2',
0
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
45 packages=['textshaper'],
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
46 include_package_data=True,
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
47 zip_safe=False,
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
48 **kw
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
49 )
53cfd6e1ad0f initial commit,
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
50