-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
44 lines (37 loc) · 1.39 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
import re
from setuptools import setup
from codecs import open
#get version number from package init
with open('tpfd/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
#get licence from package init
with open('tpfd/__init__.py', 'r') as fd:
license = re.search(r'^__license__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
#get readme
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
CLASSIFIERS = (
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy')
setup(name='tpfd',
version=version,
description='Text Parsing Function Dispatcher',
long_description=readme,
url='https://github.com/erinxocon/tpfd',
author="Erin O'Connell",
author_email='erinocon5@gmail.com',
license=license,
packages=['tpfd'],
zip_safe=False,
classifiers=CLASSIFIERS,
install_requires=['parse'],
data_files=['test/Test1.txt'])