-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
46 lines (41 loc) · 1.59 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
import os
import re
from setuptools import find_packages, setup
def get_version(*file_paths):
"""Retrieves the version from django_task/__init__.py"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = open(filename).read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
version = get_version("tables_cleaner", "__init__.py")
readme = open('README.rst').read()
history = open('CHANGELOG.rst').read().replace('.. :changelog:', '')
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-tables-cleaner',
version=version,
packages=find_packages(),
include_package_data=True,
license='MIT',
description='A Django app used to remove oldest records from specific db tables.',
long_description=readme + '\n\n' + history,
url='https://github.com/morlandi/django-tables-cleaner',
author='Mario Orlandi',
author_email='morlandi@brainstorm.it',
zip_safe=False,
classifiers=[
'Framework :: Django',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
],
)