forked from redis-collections/redis-collections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
50 lines (41 loc) · 1.47 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
import io
import os
import re
import subprocess
import sys
from setuptools import setup, find_packages
base_path = os.path.dirname(__file__)
# version
meta_file = os.path.join(base_path, 'redis_collections/__init__.py')
meta_file_contents = io.open(meta_file, encoding='utf-8').read()
meta = dict(re.findall(r'__([^_]+)__ = \'([^\']*)\'', meta_file_contents))
# release a version, publish to GitHub and PyPI
if sys.argv[-1] == 'publish':
subprocess.check_call(['git', 'tag', 'v' + meta['version']])
subprocess.check_call(['git', 'push', '--tags', 'origin', 'master:master'])
# ...the rest happens on Travis CI
sys.exit()
setup(
name=meta['title'],
version=meta['version'],
description='Set of basic Python collections backed by Redis.',
long_description=io.open('README.rst', encoding='utf-8').read(),
author=meta['author'],
author_email='mail@honzajavorek.cz',
url='https://github.com/honzajavorek/redis-collections',
license='ISC',
packages=find_packages(exclude=['tests']),
include_package_data=True,
python_requires='>=3.4',
install_requires=['redis>=3.1.0,<4.0.0'],
zip_safe=False,
keywords=['redis', 'persistence'],
classifiers=(
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Database',
)
)