forked from palewire/django-bakery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
126 lines (119 loc) · 3.91 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import os
import tempfile
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.staticfiles',
'bakery',
# 'djkombu',
# 'djcelery',
),
MIDDLEWARE_CLASSES=(),
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'bakery',
'tests',
'templates',
),
)],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [],
},
},
],
BUILD_DIR = tempfile.mkdtemp(),
STATIC_ROOT = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'bakery',
'tests',
'static',
),
),
STATIC_URL = '/static/',
MEDIA_ROOT = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'bakery',
'tests',
'media',
),
),
MEDIA_URL = '/media/',
BAKERY_VIEWS = ('bakery.tests.MockDetailView',),
# The publish management command needs these to exit, but
# we're mocking boto, so we can put nonesense in here
AWS_ACCESS_KEY_ID = 'MOCK_ACCESS_KEY_ID',
AWS_SECRET_ACCESS_KEY = 'MOCK_SECRET_ACCESS_KEY',
AWS_BUCKET_NAME = 'mock_bucket',
# Celery configuration
BROKER_URL = 'django://',
)
import django
django.setup()
# import djcelery
# djcelery.setup_loader()
from django.core.management import call_command
call_command('test', 'bakery.tests', verbosity=3)
setup(
name='django-bakery',
version='0.10.3',
description='A set of helpers for baking your Django site out as flat files',
author='The Los Angeles Times Data Desk',
author_email='datadesk@latimes.com',
url='http://www.github.com/datadesk/django-bakery/',
license="MIT",
packages=(
'bakery',
'bakery.views',
'bakery.management',
'bakery.management.commands',
'bakery.tests',
'bakery.tests.static',
'bakery.tests.media',
'bakery.tests.templates',
),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'License :: OSI Approved :: MIT License',
],
install_requires=[
'six>1.5.2',
'boto3>=1.4.4',
],
cmdclass={'test': TestCommand}
)