forked from mrbox/django-celery-transactions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
58 lines (51 loc) · 1.74 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
# coding=utf-8
import os
import sys
from setuptools import setup, Command, find_packages
class RunTests(Command):
"""RunTests class borrowed from django-celery project
"""
description = 'Run the django test suite from the tests dir.'
user_options = []
extra_args = []
def run(self):
from django.core.management import execute_from_command_line
settings_module_name = 'tests.settings'
os.environ['DJANGO_SETTINGS_MODULE'] = os.environ.get(
'DJANGO_SETTINGS_MODULE',
settings_module_name)
prev_argv = sys.argv[:]
try:
sys.argv = [__file__, 'test'] + self.extra_args
execute_from_command_line(argv=sys.argv)
finally:
sys.argv[:] = prev_argv
def initialize_options(self):
pass
def finalize_options(self):
pass
setup(
name="django-celery-transactions",
version="0.1.4",
description="Django transaction support for Celery tasks.",
long_description="See https://github.com/chrisdoble/django-celery-transactions",
author="Chris Doble",
author_email="[email protected]",
url="https://github.com/chrisdoble/django-celery-transactions",
license="Simplified BSD",
packages=["djcelery_transactions"],
install_requires=[
"celery>=2.2.7",
"Django>=1.2.4",
"django-celery>=2.2.7",
],
classifiers=[
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Database",
],
cmdclass={'test': RunTests},
)