-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (72 loc) · 2.71 KB
/
Copy pathsetup.py
File metadata and controls
80 lines (72 loc) · 2.71 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
from setuptools import setup, find_packages
import datetime
import os
YEAR = datetime.date.today().year
__author__ = "Manuel Huber"
__version__ = "0.3.18"
__license__ = "MIT"
__copyright__ = u'%s, Manuel Huber' % YEAR
# Add Travis build id if not deploying a release (tag)
if os.environ.get("TRAVIS", "") == "true":
build_id = os.environ["TRAVIS_BUILD_NUMBER"]
tag = os.environ.get("TRAVIS_TAG", "")
if tag:
if __version__ != tag:
raise RuntimeError(
"tag != version: {0}, {1}".format(tag, __version__))
else:
__version__ = "{0}.{1}".format(__version__, build_id)
# Add GitHub Actions build: add build ids if not building a release (tag)
if os.environ.get("GITHUB_ACTIONS") == "true":
build_number = os.environ["GITHUB_RUN_NUMBER"]
build_attempt = os.environ["GITHUB_RUN_ATTEMPT"]
ref_type = os.environ.get("GITHUB_REF_TYPE", "??")
ref_name = os.environ.get("GITHUB_REF_NAME", "")
if (ref_type == "tag") and ref_name:
if __version__ != ref_name:
raise RuntimeError("tag != version: {0}, {1}".format(ref_name, __version__))
else:
__version__ = "{0}.{1}.{2}".format(__version__, build_number, build_attempt)
setup_extra = dict()
if os.environ.get("NO_README", "") == "":
with open('README.md') as f:
setup_extra['long_description'] = f.read()
setup_extra['long_description_content_type'] = 'text/markdown'
setup_extra['setup_requires'] = [
'setuptools>=38.6.0'
]
setup(
name='docker-inside',
version=__version__,
description='Run a docker container with you workspace and user',
url="https://github.com/boon-code/docker-inside",
license=__license__,
author=__author__,
author_email='Manuel.h87@gmail.com',
classifiers=["Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Topic :: System :: Systems Administration"],
package_dir={
'': 'src'
},
packages=find_packages(where='./src'),
entry_points={
'console_scripts': [
'din = dockerinside.__init__:main',
'docker-inside = dockerinside.__init__:main',
'docker_inside = dockerinside.__init__:main',
'dockerinside = dockerinside.__init__:main',
'din-setup = dockerinside.setup.__init__:setup_main',
'docker-inside-setup = dockerinside.setup.__init__:setup_main',
'docker_inside_setup = dockerinside.setup.__init__:setup_main',
]
},
install_requires=[
"argparse>=1.4.0",
"argcomplete>=1.4.1",
"docker>=2.7.0",
"dockerpty>=0.4.1"
],
**setup_extra
)