-
Notifications
You must be signed in to change notification settings - Fork 15
/
config.buildenv.py
77 lines (64 loc) · 2.38 KB
/
config.buildenv.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
# Copyright (c) 2020 Graphcore Ltd. All rights reserved.
_llvm_version = "13.0.1"
config.setDefault(build_documentation=True)
installers.add(PipRequirements("requirements.txt"))
installers.add(PipRequirements("poptorch_geometric/requirements.txt"))
installers.add(
CondaPackages(
"boost-cpp=1.72.0",
"ccache=4.3",
"cmake=3.18.2",
"libstdcxx-ng=11.2.0",
"make=4.3",
"ninja=1.10.2",
"pybind11=2.6.1",
"pyyaml=5.3.1",
# Mamba overwrites that package, so it must explicitly
# appear here with the correct version.
"setuptools=58.0.4",
"spdlog=1.8.0",
# Mamba overwrites that package, so it must explicitly
# appear here with the correct version.
"typing-extensions=4.1.1",
# Mamba overwrites that package, so it must explicitly
# appear here with the correct version.
"wheel=0.34.2",
"zip=3.0"))
if config.build_documentation:
installers.add(
CondaPackages(
"breathe=4.25.1",
"docutils==0.16",
"hunspell=1.7.0",
# Indirect dependency of sphinx which
# doesn't get automatically installed.
"jinja2=3.0.3",
"latexmk=4.55",
"sphinx=3.3.1",
"sphinx_rtd_theme=0.5.0",
))
if config.install_linters:
installers.add(
CondaPackages(
"pre-commit=3.3.3",
"clang-tools=" + _llvm_version,
"pylint=2.7.2",
"yapf=0.27.0",
# To preserve the comments when updating the schemas
"ruamel.yaml=0.17.21",
))
class DownloadExternalDatasets(Installer):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.downloader_path = os.path.join(_utils.sources_dir(), 'scripts',
'download_external_datasets.py')
if not os.path.exists(self.downloader_path):
raise RuntimeError(f'Path {self.downloader_path} not exists.')
def hashString(self):
with open(self.downloader_path, "r") as f:
return f.read()
def install(self, env):
datasets_path = os.path.join(env.prefix, "external_datasets")
env.run_commands(f"mkdir {datasets_path}",
f"python3 {self.downloader_path} {datasets_path}")
installers.add(DownloadExternalDatasets())