-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·124 lines (88 loc) · 3.17 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/env python
#
# Copyright (C) 2017 Alpha Griffin
# @%@~LICENSE~@%@
"""AlphaGriffin setuptools build script.
@author ruckusist
@see https://docs.docker.com/engine/api/getting-started/#running-a-container
@see https://docs.docker.com/engine/reference/commandline/build/#tarball-contexts
Some of this script logic also taken from:
https://github.com/google/protobuf
"""
# FIXME / note to self:
# read more at https://caremad.io/posts/2013/07/setup-vs-requirement/
# -- to integrate fully pip
# -------------------------------------------------------------------------------------
#
# CUSTOMIZE THIS SECTION
# All the variables defined here should be customized for your project.
#
NS = 'dummy' # namespace / meta-package folder
NAME = 'os' # should match source package name in NS folder
REQUIRE = ['sphinx_rtd_theme'] # package dependencies
DESC = 'Dummyscript.com DummyOS'
TAGS = 'gentoo tutorial dummyscript ' # space-separated list of keywords
AUTHOR = 'ruckusist' # name or alias of author
EMAIL = 'ruckusist@alphagriffin.com' # email of author
URL = 'http://alphagriffin.com'
LICENSE = 'AG' # type of license
COPY = '2017 Alpha Griffin' # copyright
CLASS = [
# @see https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python',
'Topic :: System :: Installation/Setup',
'Topic :: Utilities',
]
#
# END CUSTOMIZATION AREA
# -------------------------------------------------------------------------------------
#################
# !!! WARNING !!!
# !!! WARNING !!!
#################
# THINK CAREFULLY BEFORE CHANGING ANYTHING BELOW THIS LINE
from setuptools import setup, find_packages
from codecs import open
from os import path
def findversion(root, name):
'''versioning strategy taken from http://stackoverflow.com/a/7071358/7203060'''
import re
vfile = path.join(root, name, "__version__.py")
vmatch = re.search(r'^__version__ *= *["\']([^"\']*)["\']', open(vfile, "rt").read(), re.M)
if vmatch:
version = vmatch.group(1)
print ("Found %s version %s" % (name, version))
return version
else:
raise RuntimeError("Expecting a version string in %s." % (vfile))
if __name__ == '__main__':
setup(
name=NAME,
version=findversion(NS, NAME),
license=LICENSE,
namespace_packages=[NS], # home for our libraries
packages=find_packages(exclude=['tests']),
author=AUTHOR,
author_email=EMAIL,
description=DESC,
long_description=open('README.rst').read(),
url=URL,
classifiers=CLASS,
keywords=TAGS,
# run-time dependencies
install_requires=['docker'
],
extras_require={
},
package_data={
},
data_files=[],
entry_points={
'console_scripts': [
'dummyos = dummy.os.__main__'
]
},
)