forked from 15five/django-scim2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
94 lines (78 loc) · 2.69 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
90
91
92
93
#!/usr/bin/env python
# Installs django-scim2
from setuptools import setup
import os
import sys
import unittest
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def get_version():
path = os.path.join(BASE_DIR, 'django_scim', '__init__.py')
version_line = None
with open(path) as fp:
for line in fp:
if line.startswith('__version__'):
version_line = line
break
if not version_line:
raise ValueError('Unable to find version line in __init__.py')
version = version_line.split('=')[1].strip().strip("'")
return version
def long_description():
"""Get the long description from the README"""
return open(os.path.join(BASE_DIR, 'README.rst')).read()
def run_tests():
settings_mod = os.environ.get('DJANGO_SETTINGS_MODULE', 'test_settings')
os.environ['DJANGO_SETTINGS_MODULE'] = settings_mod
import django
django.setup()
from django.test.utils import get_runner
from django.conf import settings
test_filter = os.environ.get('TEST_FILTER')
test_labels = [test_filter] if test_filter else []
test_runner = get_runner(settings)
failures = test_runner(
pattern='test_*.py',
verbosity=1,
interactive=True
).run_tests(test_labels)
sys.exit(failures)
setup(
name='django-scim2',
version=get_version(),
description='A partial implementation of the SCIM 2.0 provider specification for use with Django.',
url='https://github.com/15five/django-scim2',
download_url='https://github.com/15five/django-scim2/archive/master.zip',
maintainer='Paul Logston',
maintainer_email='[email protected]',
author='Paul Logston',
author_email='[email protected]',
keywords='django scim 2.0',
license='MIT',
long_description=long_description(),
packages=['django_scim'],
install_requires=[
'python-dateutil>=2.6.0',
'PlyPlus>=0.7.5',
],
scripts=['scim'],
test_suite='setup.run_tests',
zip_safe=False,
include_package_data=True,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)