-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.py
44 lines (31 loc) · 1.63 KB
/
build.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
from cpt.packager import ConanMultiPackager
import platform
import os
def docker_entry_script():
return " ".join(["conan config install http://github.com/conan-io/hooks.git -sf hooks -tf hooks &&",
"conan config set hooks.attribute_checker &&",
"conan config set hooks.binary_linter &&",
"conan config set hooks.bintray_updater &&",
"conan config set hooks.conan-center_reviewer &&",
"conan config set hooks.github_updater &&",
"conan config set hooks.spdx_checker"])
def pip_extra_packages():
return ["https://github.com/lief-project/packages/raw/lief-master-latest/pylief-0.9.0.dev.zip", "spdx_lookup"]
if __name__ == "__main__":
is_android = "android" in os.getenv("CONAN_BASE_PROFILE", "")
is_windows = platform.system() == "Windows"
if is_android:
os.system("conan config install %s" % os.getenv("CONAN_CONFIG_URL"))
builder = ConanMultiPackager(docker_entry_script=docker_entry_script(), pip_install=pip_extra_packages())
builder.add_common_builds(shared_option_name=False, pure_c=False)
filtered_builds = []
for settings, options, env_vars, build_requires, reference in builder.items:
# MinGW should use "libstdc++11"
if is_windows and settings["compiler"] == "gcc":
settings["compiler.libcxx"] = "libstdc++11"
if is_android:
if settings["compiler.libcxx"] != "libc++":
continue
filtered_builds.append([settings, options, env_vars, build_requires])
builder.builds = filtered_builds
builder.run()