-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·102 lines (89 loc) · 2.89 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
94
95
96
97
98
99
100
101
102
#!/usr/bin/env python3
from setuptools import setup
from setuptools.command.test import test as TestCommand
import os
import sys
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'demo.settings')
DJANGO_VERSIONS="django>=1.11"
PACKAGES = [
'oscar_web_payments',
'oscar_web_payments.payment',
'oscar_web_payments.checkout'
]
REQUIREMENTS = [
'django-oscar>=1.5,<2.0',
'django>=1.11',
'wtforms-django-alex',
'web-payments-connector>=2.4<4.0a'
]
TEST_REQUIREMENTS = [
'pytest',
'pytest-django',
'WebTest>=2.0,<2.1',
'coverage>=4.5,<4.6',
'django-webtest==1.9.2',
'tox>=3.0,<3.1',
]
VERSIONING = {
'root': '.',
'version_scheme': 'guess-next-dev',
'local_scheme': 'dirty-tag',
}
EXTRAS={
'django': [DJANGO_VERSIONS]
}
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
test_args = []
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import django
from django.test.utils import get_runner
import demo.settings
#settings.configure(default_settings=demo.settings)
django.setup()
from django.conf import settings
# import here, cause outside the eggs aren't loaded
TestRunner = get_runner(settings)
test_runner = TestRunner(verbosity=1, interactive=True)
failures = test_runner.run_tests(test_labels=[])
sys.exit(failures)
setup(
name='oscar-web-payments',
license="MIT",
author='Alexander Kaftan',
author_email='devkral@web.de',
description='Oscar integration for web-payments',
use_scm_version=VERSIONING,
setup_requires=['setuptools_scm'],
url='http://github.com/devkral/oscar-web-payments',
packages=PACKAGES,
extras_require=EXTRAS,
include_package_data=True,
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Libraries :: Python Modules'],
install_requires=REQUIREMENTS,
cmdclass={
'test': PyTest},
tests_require=TEST_REQUIREMENTS,
zip_safe=False)