Skip to content

Commit 05a04e8

Browse files
committed
Adds slight improvements to build, conan and CI scripts.
1 parent a174e5e commit 05a04e8

4 files changed

Lines changed: 24 additions & 27 deletions

File tree

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,19 @@ yum install -y perl-IPC-Cmd perl-Digest-SHA
1212
conan config install "$PACKAGE/ci/conan"
1313

1414
# Clone and export libqi to Conan cache.
15-
# Possible improvement:
16-
# Avoid duplicating the version number here with the version
17-
# defined in conanfile.py.
15+
QI_VERSION=$(sed -nE '/^\s*requires\s*=/,/^\s*]/{ s/\s*"qi\/([^"]+)"/\1/p }' "$PACKAGE/conanfile.py")
16+
1817
GIT_SSL_NO_VERIFY=true \
1918
git clone --depth=1 \
20-
--branch qi-framework-v4.0.1 \
19+
--branch "qi-framework-v${QI_VERSION}" \
2120
"$LIBQI_REPOSITORY_URL" \
2221
/work/libqi
23-
conan export /work/libqi --version=4.0.1
22+
conan export /work/libqi --version="${QI_VERSION}"
2423

2524
# Install dependencies of libqi-python from Conan, including libqi.
26-
# Only use the build_type as a variable for the build folder name, so
27-
# that the generated CMake preset is named "conan-release".
2825
#
2926
# Build everything from sources, so that we do not reuse precompiled binaries.
3027
# This is because the GLIBC from the manylinux images are often older than the
3128
# ones that were used to build the precompiled binaries, which means the binaries
3229
# cannot by executed.
33-
conan install "$PACKAGE" \
34-
--build="*" \
35-
-c tools.build:skip_test=true \
36-
-c tools.cmake.cmaketoolchain:generator=Ninja \
37-
-c tools.cmake.cmake_layout:build_folder_vars=[\"settings.build_type\"]
30+
conan install "$PACKAGE" --build="*"

ci/conan/global.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
core:default_profile=default
22
core:default_build_profile=default
3+
tools.build:skip_test=true
4+
tools.cmake.cmaketoolchain:generator=Ninja
5+
# Only use the build_type as a variable for the build folder name, so
6+
# that the generated CMake preset is named "conan-release".
7+
tools.cmake.cmake_layout:build_folder_vars=["settings.build_type"]

conanfile.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,22 @@
3636
]
3737

3838
USED_BOOST_COMPONENTS = [
39-
"atomic", # required by thread
40-
"chrono", # required by thread
41-
"container", # required by thread
42-
"date_time", # required by thread
43-
"exception", # required by thread
44-
"filesystem", # required by libqi
45-
"locale", # required by libqi
46-
"program_options", # required by libqi
47-
"random", # required by libqi
48-
"regex", # required by libqi
49-
"system", # required by thread
5039
"thread",
40+
# required by libqi
41+
"filesystem",
42+
"locale",
43+
"program_options",
44+
"random",
45+
"regex",
46+
# required by boost.thread
47+
"atomic",
48+
"chrono",
49+
"container",
50+
"date_time",
51+
"exception",
52+
"system",
5153
]
5254

53-
5455
class QiPythonConan(ConanFile):
5556
requires = [
5657
"boost/[~1.78]",

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ build-frontend = "build"
5959
environment-pass = ["LIBQI_REPOSITORY_URL"]
6060

6161
[tool.cibuildwheel.linux]
62-
# Build using the manylinux2014 image
6362
manylinux-x86_64-image = "manylinux2014"
64-
65-
before-all = ["ci/cibuildwheel_before_all.sh {package}"]
63+
before-all = ["ci/cibuildwheel_linux_before_all.sh {package}"]
6664

6765
[tool.cibuildwheel.linux.config-settings]
6866
"cmake.args" = ["--preset=conan-release"]

0 commit comments

Comments
 (0)