-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
64 lines (54 loc) · 1.67 KB
/
setup.py
File metadata and controls
64 lines (54 loc) · 1.67 KB
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
# -*- coding: utf-8 -*-
import os
import subprocess
from setuptools import setup, find_packages
# Fetch version from git tags, and write to version.py.
# Also, when git is not available (PyPi package), use stored version.py.
version_py = os.path.join(os.path.dirname(__file__), 'version.py')
try:
p = subprocess.Popen(['git', 'describe', '--tags'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
o = p.communicate()
if p.returncode != 0:
raise Exception('git describe failed to execute reason: %s' % o[1])
version_git = o[0].rstrip().decode('utf-8')
except Exception:
version_git = '0.1.0'
version_msg = "# Do not edit this file"
with open(version_py, 'w') as fh:
fh.write('%s%s__version__=%s' % (version_msg, os.linesep, version_git))
version = '{ver}'.format(ver=version_git)
with open('README.md') as fr:
readme = fr.read()
with open('LICENSE') as fl:
license = fl.read()
url='https://github.com/i11/cosh',
setup(
name='cosh',
version=version,
description='Container Shell',
long_description=readme,
long_description_content_type="text/markdown",
author='Ilja Bobkevic',
author_email='ilja@bobkevic.com',
url=url,
license=license,
packages=find_packages(exclude=('tests', 'docs')),
scripts=[
'bin/cosh'
],
install_requires=[
'argparse==1.4.0',
'requests==2.21.0',
'google-auth==1.5.1',
'natsort==5.3.3',
'jsonpickle==0.9.6'
],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
]
)