-
Notifications
You must be signed in to change notification settings - Fork 47
/
pyproject.toml
100 lines (79 loc) · 3.24 KB
/
pyproject.toml
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
[build-system]
requires = [
"setuptools>=42.0.2",
"wheel>=0.29.0"
]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra --cov-config=.coveragerc --cov=cyclonedds --cov-report=xml --import-mode=importlib"
required_plugins = "pytest-cov pytest-mock"
testpaths = "tests"
markers = ["fuzzing: run the fuzzing testsuite."]
# -- Below is the configuration to build wheels using cibuildwheel -- #
[tool.cibuildwheel]
# Skip PyPy (C API incompatible), Skip 32bit systems, Skip universal binaries macOS (we build specific intel/arm ones)
skip = "pp* *-win32 *_i686 *-macosx_universal2:arm64 *musllinux*"
# Don't test arm64 macos wheels (we cannot do this on ci: crossbuild)
test-skip = "*musllinux* *-macosx_arm64"
build-verbosity = "1"
test-command = "pytest -s --verbose {package}/tests"
test-extras = ["dev"]
before-all = [
"git clone --branch master --depth 1 https://github.com/eclipse-cyclonedds/cyclonedds.git main",
"mkdir cyclonedds-build",
"mkdir build"
]
before-build = [
"cd build",
"cmake ../main -DCMAKE_INSTALL_PREFIX=\"../cyclonedds-build\" -DBUILD_DDSPERF=off -DENABLE_SSL=off -DENABLE_SECURITY=off",
"cmake --build . --config RelWithDebInfo --target install",
"cd .."
]
[tool.cibuildwheel.windows]
# Add the -A x64 flag to the cyclone build for windows
before-build = [
"cd build",
'cmake ..\\main -DCMAKE_INSTALL_PREFIX="..\\cyclonedds-build" -A x64 -DBUILD_DDSPERF=off -DENABLE_SSL=off -DENABLE_SECURITY=off',
"cmake --build . --config RelWithDebInfo --target install",
"cd .."
]
# By default there is no repair command on windows set, use delvewheel
repair-wheel-command = [
"pip install delvewheel==0.0.18",
"delvewheel repair -w {dest_dir} --no-mangle-all {wheel}"
]
[tool.cibuildwheel.macos]
# Build for Apple silicon and Intel
archs = ["arm64", "x86_64"]
# DYLD_ paths are not inherited on macOS for security reasons so we need to set it explicitly
repair-wheel-command = [
'DYLD_FALLBACK_LIBRARY_PATH="$(pwd)/cyclonedds-build/lib" delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}'
]
# Env variables to signify wheel build and manipulating loading path for cyclone
[tool.cibuildwheel.linux.environment]
STANDALONE_WHEELS = "1"
LD_LIBRARY_PATH = "$(pwd)/cyclonedds-build/lib:$(pwd)/cyclonedds-build/lib64"
[tool.cibuildwheel.macos.environment]
STANDALONE_WHEELS = "1"
[tool.cibuildwheel.windows.environment]
STANDALONE_WHEELS = "1"
PATH = ".\\\\cyclonedds-build\\\\bin;$PATH"
# Overrides for macos builds, need to set CMAKE_OSX_ARCHITECTURES
[[tool.cibuildwheel.overrides]]
select = "*macosx_arm64"
before-build = [
"cd build",
"cmake ../main -DCMAKE_INSTALL_PREFIX=\"../cyclonedds-build\" -DCMAKE_OSX_ARCHITECTURES=\"arm64\" -DBUILD_DDSPERF=off -DENABLE_SSL=off -DENABLE_SECURITY=off",
"cmake --build . --config RelWithDebInfo --target install",
"cd .."
]
[[tool.cibuildwheel.overrides]]
select = "*macosx_x86_64"
before-build = [
"cd build",
"cmake ../main -DCMAKE_INSTALL_PREFIX=\"../cyclonedds-build\" -DCMAKE_OSX_ARCHITECTURES=\"x86_64\" -DBUILD_DDSPERF=off -DENABLE_SSL=off -DENABLE_SECURITY=off",
"cmake --build . --config RelWithDebInfo --target install",
"cd .."
]
# -- End of cibuildwheel configuration -- #