-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·74 lines (64 loc) · 2.08 KB
/
setup.py
File metadata and controls
executable file
·74 lines (64 loc) · 2.08 KB
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
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.core import Command
from os import path
SITE_ROOT = path.dirname(path.realpath(__file__))
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from django.conf import settings
settings.configure(
DATABASES={
'default': {
'NAME': ':memory:',
'ENGINE': 'django.db.backends.sqlite3'
}
},
INSTALLED_APPS=(
'unchained',
'django.contrib.auth',
'django.contrib.contenttypes'
),
TEMPLATE_DIRS=(
path.join(SITE_ROOT, 'unchained/tests/templates')
)
)
from django.core.management import call_command
import django
if django.VERSION[:2] >= (1, 7):
django.setup()
django.setup()
call_command('syncdb', interactive=False, verbosity=0)
call_command('test', 'unchained')
setup(name='unchained',
version='1.1',
packages=['unchained'],
license='MIT',
author='Hansel Dunlop',
author_email='hansel@interpretthis.org',
url='https://github.com/aychedee/unchained/',
description='A collection of helper functions that helps Django break free',
long_description=open("README.md").read(),
install_requires=['Django >= 1.4.3'],
tests_require=['Django >= 1.4.3'],
cmdclass={'test': TestCommand},
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Framework :: Django',
],
)