forked from ambitioninc/django-db-mutex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (52 loc) · 1.64 KB
/
setup.py
File metadata and controls
58 lines (52 loc) · 1.64 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
import re
import multiprocessing
from setuptools import setup, find_packages
# import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
assert multiprocessing
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = 'db_mutex/version.py'
mo = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', open(VERSION_FILE, 'rt').read(), re.M)
if mo:
return mo.group(1)
else:
raise RuntimeError('Unable to find version string in {0}.'.format(VERSION_FILE))
setup(
name='django-db-mutex',
version=get_version(),
description='Acquire a mutex via the DB in Django',
long_description=open('README.rst').read(),
url='http://github.com/ambitioninc/django-db-mutex/',
author='Wes Kendall',
author_email='opensource@ambition.com',
packages=find_packages(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
],
license='MIT',
install_requires=[
'Django>=2.2',
],
tests_require=[
'psycopg2',
'django-nose>=1.4',
'mock',
'coverage>=3.7.1',
'freezegun>=0.3.2',
'django-dynamic-fixture'
],
test_suite='run_tests.run_tests',
include_package_data=True,
zip_safe=False,
)