-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathsetup.py
79 lines (62 loc) · 1.88 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
from os import chdir, environ, system
from subprocess import call
from sys import exit
from setuptools import setup, find_packages, Command
from django_stormpath import __version__
class BaseCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
class TestCommand(BaseCommand):
description = 'run self-tests'
def run(self):
chdir('testproject')
ret = system('coverage run --source=django_stormpath manage.py test --settings=testproject.settings testapp && coverage html')
if ret != 0:
exit(-1)
else:
exit(0)
class DocCommand(BaseCommand):
description = 'generate documentation'
def run(self):
environ['DJANGO_SETTINGS_MODULE'] = 'testproject.settings'
try:
chdir('docs')
ret = system('make html')
exit(ret)
except OSError as e:
print(e)
exit(-1)
setup(
name = 'django-stormpath',
version = __version__,
author = 'Stormpath, Inc.',
author_email = '[email protected]',
description = 'Stormpath integration for Django.',
license = 'Apache',
url = 'https://github.com/stormpath/stormpath-django',
zip_safe = False,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages = find_packages(),
install_requires = [
'requests-oauthlib>=0.4.2',
'stormpath>=2.1.8',
'Django>=1.6',
],
extras_require = {
'test': ['codacy-coverage', 'python-coveralls', 'coverage'],
},
cmdclass = {
'test': TestCommand,
'docs': DocCommand,
},
)