-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (58 loc) · 2.03 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Require setuptools for script installation
try:
from setuptools import setup
except ImportError:
from sys import stderr
print >> stderr, (
'Sorry, you must install the ``setuptools`` module'
' in order to install this package.\n'
'``setuptools`` can be installed with the command\n'
' easy_install setuptools\n'
'or by download from <http://pypi.python.org/pypi/setuptools>.\n'
)
raise
from textwrap import dedent, fill
def format_desc(desc):
if len(desc) > 200:
raise ValueError("Description cannot exceed 200 characters.")
return fill(dedent(desc), 200)
def format_classifiers(classifiers):
return dedent(classifiers).strip().split('\n')
def split_keywords(keywords):
return dedent(keywords).strip().replace('\n', ' ').split(' ')
def file_contents(filename):
with open(filename) as f:
return f.read()
setup(
name = "odfit",
version = "0.6.2",
author = "Ted Tibbetts",
author_email = "intuited@gmail.com",
url = "http://github.com/intuited/odfit",
description = format_desc("""
Produces textual information based on the contents of
OpenDocument Format files and other archives.
"""),
long_description = file_contents('README.txt'),
classifiers = format_classifiers("""
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Utilities
Topic :: System :: Archiving
Topic :: Office/Business
Topic :: Software Development :: Version Control
"""),
keywords = split_keywords("""
xml opendocument odt ods odb odp openoffice
archive zip dump diff compare
"""),
py_modules = ['odfit'],
entry_points = {
'console_scripts': ['odfit = odfit:main']
},
)