-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
78 lines (65 loc) · 1.97 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
73
74
75
76
77
78
import codecs
import os
import re
from setuptools import setup, find_packages, Command
here = os.path.abspath(os.path.dirname(__file__))
package = 's3_auto_uploader'
install_requires = [
'boto3==1.4.0',
'botocore==1.4.51',
'watchdog==0.8.3',
]
tests_require = [
'pytest',
'pytest-cov',
'vcrpy',
]
version = "0.1.0"
changes = os.path.join(here, "CHANGES.rst")
match = r'^#*\s*(?P<version>[0-9]+\.[0-9]+(\.[0-9]+)?)$'
with codecs.open(changes, encoding='utf-8') as changes:
for line in changes:
res = re.match(match, line)
if res:
version = res.group("version")
break
# Get the long description
with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
# Get version
with codecs.open(os.path.join(here, 'CHANGES.rst'), encoding='utf-8') as f:
changelog = f.read()
class VersionCommand(Command):
description = "print library version"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
print(version)
setup(
name='s3_auto_uploader',
version=version,
description='Monitoring folder for a new files and send it to a Amazon S3 bucket',
long_description=long_description,
url='https://github.com/solidarium/s3-auto-uploader',
author='Olist Developers',
author_email='developers@olist.com',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries',
],
keywords='amazon s3 monitoring watcher filesystem',
packages=find_packages(exclude=['docs', 'tests*']),
install_requires=install_requires,
setup_requires=['pytest-runner', 'pytest'],
test_suite='tests',
tests_require=tests_require,
cmdclass={
"version": VersionCommand,
},
)