-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
70 lines (64 loc) · 2.7 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
# -*- coding: UTF-8 -*-
import os
import re
from os.path import join, dirname
from setuptools import setup, find_packages
def get_version(*file_paths):
"""Retrieves the version from the given path"""
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.")
def long_description():
"""Return long description from README.rst if it's present
because it doesn't get installed."""
try:
return open(join(dirname(__file__), 'README.md')).read()
except IOError:
return ''
setup(
name='django-celery-token-bucket',
packages=find_packages(),
version=get_version("django_celery_token_bucket", "__init__.py"),
description='A token bucket implementation for celery rate limiting in Django',
author='Jens Nistler <[email protected]>, Richard Ackon <[email protected]>',
author_email='[email protected]',
long_description=long_description(),
long_description_content_type='text/markdown',
install_requires=[
'celery>=5.3.0',
'Django>=4.2',
'django-celery-beat>=2.5.0',
'kombu>=5.3.0',
],
license='MIT',
url='https://github.com/RegioHelden/django-celery-token-bucket',
project_urls={
"Documentation": "https://github.com/RegioHelden/django-celery-token-bucket/blob/master/README.md",
"Source": "https://github.com/RegioHelden/django-celery-token-bucket",
"Tracker": "https://github.com/RegioHelden/django-celery-token-bucket/issues",
"Changelog": "https://github.com/RegioHelden/django-celery-token-bucket/blob/master/CHANGELOG.md",
},
keywords=['django', 'celery', 'token', 'bucket', 'rate limiting'],
include_package_data=True,
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
]
)