This repository has been archived by the owner on Jun 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
68 lines (59 loc) · 2.03 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
from setuptools import setup
from distutils.core import Command
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': 'test.db',
'TEST_NAME': 'test.db',
'ENGINE': 'django.db.backends.sqlite3'
}
},
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.gis',
'calculate',
),
MIDDLEWARE_CLASSES=(),
)
from django.core.management import call_command
import django
if django.VERSION[:2] >= (1, 7):
django.setup()
# With Django 1.6, the way tests were discovered changed (see
# https://docs.djangoproject.com/en/1.7/releases/1.6/#new-test-runner)
# Set the argument to the test management command appropriately
# depending on the Django version
test_module = 'calculate.tests'
if django.VERSION[:2] < (1, 6):
test_module = 'calculate'
call_command('test', test_module)
setup(
name='latimes-calculate',
version='0.3.0',
description='Some simple math we use to do journalism.',
author='Ben Welsh',
author_email='[email protected]',
url='http://github.com/datadesk/latimes-calculate',
download_url='http://github.com/datadesk/latimes-calculate.git',
packages=("calculate",),
cmdclass={'test': TestCommand},
install_requires=('six>=1.4.1'),
license='MIT',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)