-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
48 lines (43 loc) · 1.45 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
#!/usr/bin/env python
import subprocess
from setuptools import setup, find_packages
try:
ver = subprocess.check_output(['git', 'describe', '--abbrev=0']).strip()
if type(ver) is bytes:
ver = ver.decode('utf-8')
except:
with open('version.py', 'r') as fh:
ver = open('version.py').read().split('=')[-1].strip()
if type(ver) is bytes:
ver = ver.decode('utf-8')
with open('version.py', 'w') as fh:
fh.write('# This file is managed by git tag\n__version__ = {}\n'.format(ver))
with open('requirements.txt', 'r') as fh:
required = fh.read().splitlines()
setup(
name='aws-tools',
version=ver,
description='Switching between multiple AWS accounts & renewing API access keys',
long_description=open('README.rst').read(),
license='MIT',
url='https://github.com/bartekj/aws-tools',
keywords='aws key keys',
packages=find_packages(),
scripts=[
'bin/aws-env-update.py',
'bin/aws-roll-keys.py',
'bin/aws-list-ec2.py',
'bin/aws-clean-eb-versions.py',
'bin/aws_tools_completion.bash',
],
install_requires=required,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
],
)