forked from ralphbean/taskw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (68 loc) · 2.26 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
66
67
68
69
70
71
72
73
import os
import sys
import uuid
from setuptools import setup, find_packages
f = open('README.rst')
long_description = f.read().strip()
long_description = long_description.split('split here', 1)[1]
f.close()
REQUIREMENTS_FILES = {
'test': 'test_requirements.txt',
'install': 'requirements.txt',
}
REQUIREMENTS = {}
for category, filename in REQUIREMENTS_FILES.items():
requirements_path = os.path.join(
os.path.dirname(__file__),
filename
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in parse_requirements(
requirements_path,
session=uuid.uuid1()
)
]
except ImportError:
requirements = []
with open(requirements_path, 'r') as in_:
requirements = [
req for req in in_.readlines()
if not req.startswith('-')
and not req.startswith('#')
]
REQUIREMENTS[category] = requirements
if sys.version_info < (2, 7):
REQUIREMENTS['test'].append('unittest2')
REQUIREMENTS['install'].append('ordereddict')
setup(name='taskw',
version='1.2.0',
description="Python bindings for your taskwarrior database",
long_description=long_description,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Intended Audience :: Developers",
],
keywords='taskwarrior task',
author='Ralph Bean',
author_email='[email protected]',
url='http://github.com/ralphbean/taskw',
license='GPLv3+',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=REQUIREMENTS['install'],
test_suite='nose.collector',
tests_require=REQUIREMENTS['test'],
entry_points="""
# -*- Entry points: -*-
""",
)