/
pyproject.toml
43 lines (36 loc) · 1.54 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
#
# 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 .
#
[build-system]
requires = [
"setuptools",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel.linux]
before-build='''
# 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++"}