-
Notifications
You must be signed in to change notification settings - Fork 31
/
setup.py
89 lines (83 loc) · 2.58 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
80
81
82
83
84
85
86
87
88
89
"""
Setup script.
"""
import os
import sys
from setuptools import setup
version = '2.0.1'
if sys.argv[-1] == 'tag':
os.system("git tag -a %s -m 'version %s'" % (version, version))
os.system("git push origin master --tags")
sys.exit()
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
os.system("python setup.py bdist_wheel upload")
sys.exit()
if sys.argv[-1] == 'test':
test_requirements = [
'pytest',
'flake8',
'coverage'
]
try:
modules = map(__import__, test_requirements)
except ImportError as e:
err_msg = e.message.replace("No module named ", "")
msg = "%s is not installed. Install your test requirments." % err_msg
raise ImportError(msg)
os.system('py.test')
sys.exit()
# From docs for pytest-runner
needs_pytest = any(arg in ['pytest', 'test', 'ptr'] for arg in sys.argv)
setup_requires = ['pytest-runner'] if needs_pytest else []
setup(
author='Ritesh Kadmawala',
author_email='ritesh@loanzen.in',
description='falcon-auth',
download_url='',
setup_requires=setup_requires,
install_requires=[
'falcon'
],
extras_require={
'backend-hawk': ['mohawk>=1.0.0,<2.0.0'],
'backend-jwt': ['pyjwt>=1.7.1,<2.0.0']
},
license='MIT',
name='falcon-auth',
packages=[
'falcon_auth',
],
scripts=[],
test_suite='tests',
tests_require=[
'pytest>=3.0.7,<4.0.0',
'pytest-cov>=2.4.0,<3.0.0',
'pytest-mock>=1.6.0,<2.0.0',
'codecov>=2.0.3,<3.0.0',
'coverage>=4.0.3,<5.0.0',
'tox>=2.3.1,<3.0.0',
'python-coveralls>=2.9.1,<3.0.0'
],
url='https://github.com/loanzen/falcon-auth',
version=version,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Falcon",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
"Topic :: Software Development :: Libraries :: Python Modules",
]
)