forked from hearsaycorp/django-richenum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·70 lines (57 loc) · 1.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
#!/usr/bin/env python
# W/o multiprocessing, nosetests can't exit cleanly.
# (See http://bugs.python.org/issue15881#msg170215)
import multiprocessing # noqa
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
tests_require = (
'django-nose',
)
install_requires = (
'Django>=1.4,<1.7',
'richenum',
)
class DjangoTest(TestCommand):
DIRNAME = os.path.dirname(__file__)
APPS = ('tests',)
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
from django.conf import settings
settings.configure(
DEBUG=True,
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(self.DIRNAME, 'database.db')}},
CACHES={
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}},
INSTALLED_APPS=('django_nose',) + self.APPS)
from django_nose import NoseTestSuiteRunner
runner = NoseTestSuiteRunner(failfast=False, interactive=False)
sys.exit(runner.run_tests(self.APPS))
setup(
name='django-richenum',
version='1.2.0',
description='Django Enum library for python.',
long_description=(
open('README.rst').read() + '\n\n' +
open('CHANGELOG.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
classifiers=[],
keywords='python django enum richenum',
url='https://github.com/hearsaycorp/django-richenum',
author='Hearsay Social',
author_email='[email protected]',
license='MIT',
package_dir={'': 'src'},
packages=find_packages('src'),
install_requires=install_requires,
tests_require=tests_require,
cmdclass={'test': DjangoTest},
)