forked from pthom/imgui_bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
95 lines (82 loc) · 3.53 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
[build-system]
requires = [
"setuptools>=42",
"wheel",
"pybind11>=2.9.2",
"cmake>=3.22, !=3.25.0", # cmake 3.25.0 is buggy and fails with OpenCV (see https://github.com/opencv/opencv/issues/22784)
"scikit-build>=0.14.1",
"ninja; platform_system!='Windows'",
"patch>=1.16",
"conan>=1.5",
"distro<=1.7.0,>=1.0.2",
]
build-backend = "setuptools.build_meta"
[tool.isort]
profile = "black"
[tool.cibuildwheel]
build-verbosity = 1
# Target python versions:
build = ["cp39-*", "cp310-*", "cp311-*"]
# Tests
test-requires = "pytest"
test-command = "pytest {project}/tests" # cibuildwheel doc says pytest {package}/tests !
#####################################
# macos wheels options
#####################################
[tool.cibuildwheel.macos]
# identify whether this is a M1 or intel
before-build = "uname -a"
# Skip trying to test arm64 builds on Intel Macs
# test-skip = ["*-macosx_arm64 *-macosx_universal2:arm64"]
#
# Skip trying to test x86_64 builds on Mac M1
# test-skip = ["*-macosx_x86_64 *-macosx_universal2:x86_64"]
# test-skip = ["*-macosx_arm64 *-macosx_universal2:arm64"]
test-skip = ["*"]
# Environment variables
# IMGUIBUNDLE_OPENCV_FETCH_SOURCE => Will fetch, build and install a very-minimalist OpenCV
environment = { MACOSX_DEPLOYMENT_TARGET="11.0" }
# Architectures
# -------------
# archs = ["universal2"] # building universal2 fails miserably at this time: see comment in external/immvision/find_opencv.cmake
# So, we build separately for x86_64 and arm64
# archs = ["x86_64", "arm64"]
# Actually, we (temporarily) do not build for arm64 on github's CI, since it succeeds to build a wheel,
# however the resulting wheel wants to link to intel IPP, which is not available on arm.
# => mac arm61 will need to be built and uploaded from an M1 mac
archs = ["x86_64"]
#####################################
# linux wheels options
#####################################
[tool.cibuildwheel.linux]
skip = ["*i686"]
test-skip = ["cp311-musllinux_x86_64"] # opencv-python not yet available there
# Environment variables
# IMGUIBUNDLE_OPENCV_FETCH_SOURCE => Will fetch, build and install a very-minimalist OpenCV
# environment = { IMGUIBUNDLE_OPENCV_FETCH_SOURCE="ON" }
# Install glfw dev packages on manylinux:
# --------------------------------------
# https://www.glfw.org/docs/3.3/compile.html#compile_deps
# https://iscinumpy.dev/post/cibuildwheel-2-2-0/
# cibuildwheel has added a new platform: musllinux
# Remember, the manylinux1 image has been in maintenance mode, has no support for Python 3.10,
# and will be fully retired at the end of 2021.
#
# This also means that installing things inside the images can vary even further;
# * manylinux1 (CentOS 5), manylinux2010 (CentOS 6), and manylinux2014 (CentOS 7) all use yum;
# => yum install -y libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
# * manylinux_2_24 (Debian 8) uses apt (and is stuck on GCC 6),
# => apt install xorg-dev
# * musllinux_1_1 MUSL based distributions of Linux (like Alpine). uses apk
before-all = "yum install -y libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel"
[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
before-all = "apk add xorg-server-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev"
#####################################
# windows wheels options
#####################################
[tool.cibuildwheel.windows]
skip = ["*win32"]
# Environment variables
# IMGUIBUNDLE_OPENCV_FETCH_SOURCE => Download a precompiled version of opencv4.6.0
# environment = { IMGUIBUNDLE_OPENCV_WIN_USE_OFFICIAL_PREBUILT_460="ON" }