forked from wbarnha/python-rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
49 lines (42 loc) · 2.78 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
[build-system]
requires = ["setuptools", "wheel", "cython", "pkgconfig", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
build-frontend = "build"
build = "cp3*"
skip = ["*-macosx_universal*", "*-win32", "*-manylinux_i686", "*-musllinux_*"]
archs = ["auto64"]
test-requires = ['.[test] pytest']
test-command = ['pytest --pyargs rocksdb']
manylinux-x86_64-image = "manylinux2014"
environment = {ROCKSDB_VER="v6.14.6", LIBROCKSDB_PATH="/opt/rocksdb-$ROCKSDB_VER"}
[tool.cibuildwheel.linux]
# Avoid re-building the C library in every iteration by testing for the build directory.
before-build = "yum install -y bzip2-devel lz4-devel snappy-devel zlib-devel python3-Cython && (test -d $LIBROCKSDB_PATH || ( git clone https://github.com/facebook/rocksdb --depth 1 --branch $ROCKSDB_VER $LIBROCKSDB_PATH && cd $LIBROCKSDB_PATH && CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j $(nproc) )) && pushd $LIBROCKSDB_PATH && make install-shared && ldconfig && popd"
[tool.cibuildwheel.macos]
environment = {ROCKSDB_VER="v6.29.5", LIBROCKSDB_PATH="/usr/local/opt/rocksdb-$ROCKSDB_VER", LIBRARY_PATH="/usr/local/lib/"}
before-build = [
"brew install bzip2 lz4 snappy zlib cython git",
'export LDFLAGS="-L/usr/local/opt/bzip2/lib"',
'export CPPFLAGS="-I/usr/local/opt/bzip2/include"',
'alias nproc="sysctl -n hw.logicalcpu"',
"(test -d $LIBROCKSDB_PATH || ( git clone https://github.com/facebook/rocksdb --depth 1 --branch $ROCKSDB_VER $LIBROCKSDB_PATH && cd $LIBROCKSDB_PATH && CXXFLAGS='-flto -Os' PORTABLE=1 make shared_lib -j $(nproc) )) && pushd $LIBROCKSDB_PATH && make install-shared && update_dyld_shared_cache && popd",
]
repair-wheel-command='DYLD_LIBRARY_PATH=$LIBROCKSDB_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}'
test-command = ['DYLD_LIBRARY_PATH=$LIBROCKSDB_PATH pytest --pyargs rocksdb']
[tool.cibuildwheel.windows]
before-build = [
"vcpkg install zlib:x64-windows",
"vcpkg install bzip2:x64-windows",
"vcpkg install lz4:x64-windows",
"vcpkg install snappy:x64-windows",
"vcpkg install rocksdb[bzip2,zlib,lz4,snappy]:x64-windows --recurse",
'echo $(python --version) && python -m pip install cython && python -m cython -3 --cplus --fast-fail --annotate rocksdb/_rocksdb.pyx && python ./setup.py build_ext --include-dirs=$(VCPKG_ROCKSDB_INCLUDE_PATH) --library-dirs=$(VCPKG_ROCKSDB_LIB_PATH) --libraries"=shlwapi rpcrt4"',
]
[tool.cibuildwheel.windows.environment]
VCPKG_ROCKSDB_INCLUDE_PATH= "C:\\vcpkg\\installed\\x64-windows\\include\\"
VCPKG_ROCKSDB_LIB_PATH= "C:\\vcpkg\\installed\\x64-windows\\lib\\"
vcpkgVersion= "2020.06.15"
vcpkgInstallParamPath= '$(Build.SourcesDirectory)\\.azure-pipelines\\vcpkg'
vcpkgBinariesPath= 'C:\\Users\\VssAdministrator\\AppData\\Local\\vcpkg\\archives'
"vcpkg.arch"= 'x64'