forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup.py
128 lines (113 loc) · 3.7 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
124
125
126
127
128
from __future__ import with_statement
import fnmatch
import os
import os.path
import sys
try:
from setuptools import setup, find_packages
except ImportError:
sys.stderr.write("install failed - requires setuptools\n")
sys.exit(1)
if sys.version_info < (2, 6):
sys.stderr.write("install failed - requires python v2.6 or greater\n")
sys.exit(1)
def find_files(pattern, path=None, root="rez"):
paths = []
basepath = os.path.realpath(os.path.join("src", root))
path_ = basepath
if path:
path_ = os.path.join(path_, path)
for root, _, files in os.walk(path_):
files = [x for x in files if fnmatch.fnmatch(x, pattern)]
files = [os.path.join(root, x) for x in files]
paths += [x[len(basepath):].lstrip(os.path.sep) for x in files]
return paths
# get version from source
dirname = os.path.dirname(__file__)
version = os.path.join(dirname, "src", "rez", "utils", "_version.py")
with open(version) as f:
code = f.read().strip()
_rez_version = None # just to keep linting happy
exec(code) # inits _rez_version
version = _rez_version
scripts = [
"rez-config",
"rez-build",
"rez-release",
"rez-env",
"rez-context",
"rez-suite",
"rez-interpret",
"rez-python",
"rez-selftest",
"rez-bind",
"rez-search",
"rez-view",
"rez-status",
"rez-help",
"rez-depends",
"rez-memcache",
"rez-yaml2py",
"_rez_fwd", # TODO rename this _rez-forward for consistency
"_rez-complete",
"rez-gui"
]
setup(
name="bleeding-rez",
version=version,
description=("A cross-platform packaging system that can build and "
"install multiple version of packages, and dynamically "
"configure resolved environments at runtime."),
keywords="package resolve version build install software management",
url="https://github.com/mottosso/bleeding-rez",
author="Marcus Ottosson",
author_email="konstruktion@gmail.com",
license="LGPL",
entry_points={
"console_scripts": [
"rez = rez.cli._main:run",
"bez = rez.cli._bez:run",
# Alias
"rezolve = rez.cli._main:run",
] + [
"{cmd} = rez.cli._main:{func}".format(
cmd=script,
func=script.replace("-", "_")
)
for script in scripts
]
},
include_package_data=True,
zip_safe=False,
package_dir={'': 'src'},
packages=find_packages('src', exclude=["tests"]),
package_data={
'rez':
['rezconfig', 'utils/logging.conf'] +
['README*'] +
find_files('*', 'completion') +
find_files('*', 'tests/data'),
'rezplugins':
find_files('rezconfig', root='rezplugins') +
find_files('*.cmake', 'build_system', root='rezplugins') +
find_files('*', 'build_system/template_files', root='rezplugins'),
'rezgui':
find_files('rezguiconfig', root='rezgui') +
find_files('*', 'icons', root='rezgui')
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development",
"Topic :: System :: Software Distribution"
]
)