-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (72 loc) · 2.21 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
74
75
76
77
78
79
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
import uuid
from benzo import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
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('#')
]
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import tox
errno = tox.cmdline(self.test_args)
sys.exit(errno)
setup(
name='benzo',
version=version_string,
url='https://github.com/coddingtonbear/benzo',
description=(
'Hand-curate your artisanal REST requests more easily.'
),
author='Adam Coddington',
author_email='me@adamcoddington.net',
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
],
install_requires=requirements,
tests_require=['tox', ],
cmdclass={'test': Tox},
packages=find_packages(),
entry_points={
'console_scripts': [
'benzo=benzo.cmdline:main'
],
'benzo_templates': [
'form=benzo.templates.default.form:Template',
'json=benzo.templates.default.json:Template',
'yaml=benzo.templates.default.yaml:Template',
'twilio.sms=benzo.templates.twilio.sms:Template',
'urbanairship.push=benzo.templates.urbanairship.push:Template'
],
'benzo_formatters': [
'yaml=benzo.formatters.yaml:Formatter',
'json=benzo.formatters.json:Formatter',
'form=benzo.formatters.form:Formatter',
]
},
)