-
Notifications
You must be signed in to change notification settings - Fork 64
/
pyproject.toml
80 lines (71 loc) · 3.18 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
#
# To generate wheels locally for linux run
# python3 -m cibuildwheel --output-dir dist --platform linux .
# To generate wheels locally for mac x86_64 run
# python3 -m cibuildwheel --output-dir dist --platform macos --arch x86_64 .
# To generate wheels locally for windows AMD64
# python3 -m cibuildwheel --output-dir dist --platform windows --arch AMD64 .
[build-system]
requires = [
"setuptools",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel.linux]
before-build='''
# Update the mirror list for Centos mirror deprecation
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
# Install system deps
# Toolchains
yum install -y cmake git gtest-devel \
lz4-devel libzstd-devel xxhash-devel libpng-devel
# Install and compile libraries
thread=$(nproc)
# Build Fmt
cd /tmp; git clone https://github.com/fmtlib/fmt.git -b 10.2.1 \
&& cd fmt \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DFMT_TEST=OFF .; make -j$thread install; rm -rf /tmp/fmt;
cd /tmp && git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git -b 3.0.1 \
&& cd libjpeg-turbo \
&& cmake -DCMAKE_BUILD_TYPE=Release -DWITH_JPEG8=1 -DCMAKE_INSTALL_DEFAULT_PREFIX=/usr .;make -j$thread install; rm -rf /tmp/libjpeg-turbo;
cd /tmp && git clone --recursive https://github.com/boostorg/boost.git -b boost-1.84.0 \
&& cd boost \
&& ./bootstrap.sh \
&& ./b2 --with-system --with-filesystem --with-thread --with-chrono --with-date_time --with-serialization --with-iostreams install \
&& rm -rf /tmp/boost;
'''
[tool.cibuildwheel.macos]
before-build="brew install boost cmake fmt glog jpeg-turbo libpng lz4 xxhash zstd"
environment = {"CMAKE_ARGS"="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"}
##
# Specifics for Windows platform
##
# VCPKG is used to retrieve and compile static libraries
# To ensure we have a fast build we:
# - are editing x64-windows-static.cmake to build RELEASE only artifacts
# - build only the required boost dependencies (building all boost is slow)
##
[tool.cibuildwheel.windows]
environment = {"CMAKE_GENERATOR"="Visual Studio 17 2022"}
before-build = [
"if not exist \"vcpkg\" git clone --branch 2024.08.23 https://github.com/microsoft/vcpkg.git",
"cd vcpkg",
"findstr /c:\"set(VCPKG_BUILD_TYPE release)\" triplets\\x64-windows-static.cmake || echo set(VCPKG_BUILD_TYPE release) >> triplets\\x64-windows-static.cmake",
"bootstrap-vcpkg.bat -disableMetrics",
"vcpkg update",
"vcpkg integrate install",
"vcpkg integrate remove",
"vcpkg install lz4:x64-windows-static",
"vcpkg install zstd:x64-windows-static",
"vcpkg install xxhash:x64-windows-static",
"vcpkg install libpng:x64-windows-static",
"vcpkg install libjpeg-turbo:x64-windows-static",
"vcpkg install fmt:x64-windows-static",
"vcpkg install boost-date-time:x64-windows-static",
"vcpkg install boost-filesystem:x64-windows-static",
"vcpkg install boost-iostreams:x64-windows-static",
"vcpkg install boost-system:x64-windows-static",
"vcpkg install boost-uuid:x64-windows-static",
"vcpkg install boost-interprocess:x64-windows-static",
]