forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
101 lines (85 loc) · 3.32 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
from __future__ import print_function, with_statement
import fnmatch
import os
import os.path
import sys
try:
from setuptools import setup, find_packages
except ImportError:
print("install failed - requires setuptools", file=sys.stderr)
sys.exit(1)
if sys.version_info < (2, 7):
print("install failed - requires python v2.7 or greater", file=sys.stderr)
sys.exit(1)
# carefully import some sourcefiles that are standalone
source_path = os.path.dirname(os.path.realpath(__file__))
src_path = os.path.join(source_path, "src")
sys.path.insert(0, src_path)
from rez.utils._version import _rez_version
from rez.cli._entry_points import get_specifications
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
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md')) as f:
long_description = f.read()
setup(
name="rez",
version=_rez_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",
long_description=long_description,
long_description_content_type='text/markdown',
url="https://github.com/nerdvegas/rez",
author="Allan Johns",
author_email="[email protected]",
license="LGPL",
entry_points={
"console_scripts": get_specifications().values()
},
include_package_data=True,
zip_safe=False,
package_dir={'': 'src'},
packages=find_packages('src', exclude=["build_utils",
"build_utils.*",
"tests"]),
package_data={
'rez':
['utils/logging.conf'] +
['README*'] +
find_files('*', 'completion') +
find_files('*', 'data') +
find_files('*.exe', 'vendor/distlib'),
'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.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development",
"Topic :: System :: Software Distribution"
]
)