forked from willtrking/thumbor_aws
-
Notifications
You must be signed in to change notification settings - Fork 70
/
setup.py
72 lines (65 loc) · 2.07 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
71
72
# coding: utf-8
import os
import sys
import re
from setuptools import setup, find_packages
def version():
"""retrieve version from tag name"""
ci_tag = os.getenv('CIRCLE_TAG')
# Try to parse tag from CI variable, if set write version.txt file with current version
if ci_tag is not None:
if re.match('\d+(\.\d+)*', ci_tag):
with open('version.txt', 'w+') as f:
f.write(ci_tag)
return ci_tag
# Variable is set but format is incorrect, error
info = "Git tag: `{0}` is not set or does not match the version pattern of this app".format(
ci_tag
)
sys.exit(info)
# Read version from file
with open('version.txt') as f:
return f.read()
def readme():
"""print long description"""
with open('README.md') as f:
return f.read()
setup(
name='tc_aws',
version=version(),
description='Thumbor AWS extensions',
long_description=readme(),
long_description_content_type='text/markdown',
author='Thumbor-Community & William King',
author_email='[email protected]', # Original author email is: [email protected]
zip_safe=False,
include_package_data=True,
packages=find_packages(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
keywords='thumbor aws',
install_requires=[
'python-dateutil>=2.8',
'thumbor>=7.0.0a2,<8',
'aiobotocore==0.12.0',
'boto3>=1.9,<1.13',
],
extras_require={
'tests': [
'coverage>=6.5',
'moto[server]>=4.0',
'mock>=4.0',
'pytest>=7.2',
],
},
)