forked from facebookresearch/CompilerGym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
95 lines (86 loc) · 3.04 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
#!/usr/bin/env python3
#
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import distutils.util
import setuptools
with open("VERSION") as f:
version = f.read().strip()
with open("README.md") as f:
long_description = f.read()
with open("compiler_gym/requirements.txt") as f:
requirements = [ln.split("#")[0].rstrip() for ln in f.readlines()]
# When building a bdist_wheel we need to set the appropriate tags: this package
# includes compiled binaries, and does not include compiled python extensions.
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
class bdist_wheel(_bdist_wheel):
def finalize_options(self):
_bdist_wheel.finalize_options(self)
self.root_is_pure = False
def get_tag(self):
python, abi, plat = _bdist_wheel.get_tag(self)
python, abi = "py3", "none"
return python, abi, plat
except ImportError:
bdist_wheel = None
setuptools.setup(
name="compiler_gym",
version=version,
description="Reinforcement learning environments for compiler research",
author="Facebook AI Research",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/facebookresearch/CompilerGym",
license="MIT",
packages=[
"compiler_gym",
"compiler_gym.bin",
"compiler_gym.datasets",
"compiler_gym.envs",
"compiler_gym.envs.llvm",
"compiler_gym.envs.llvm.service",
"compiler_gym.envs.llvm.service.passes",
"compiler_gym.service",
"compiler_gym.service.proto",
"compiler_gym.spaces",
"compiler_gym.third_party",
"compiler_gym.third_party.autophase",
"compiler_gym.third_party.llvm",
"compiler_gym.third_party.inst2vec",
"compiler_gym.util",
"compiler_gym.util.flags",
"compiler_gym.views",
],
package_dir={
"": "bazel-bin/package.runfiles/CompilerGym",
},
package_data={
"compiler_gym": [
"envs/llvm/service/passes/*.txt",
"envs/llvm/service/service",
"envs/llvm/service/libLLVMPolly.so",
"third_party/inst2vec/*.pickle",
"third_party/cBench/benchmarks.txt",
"third_party/cBench/cBench/crc32.bc", # Needed for install-tests.
"third_party/llvm/*",
]
},
install_requires=requirements,
include_package_data=True,
python_requires=">=3.6",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Compilers",
],
cmdclass={"bdist_wheel": bdist_wheel},
platforms=[distutils.util.get_platform()],
zip_safe=False,
)