-
Notifications
You must be signed in to change notification settings - Fork 72
/
pyproject.toml
146 lines (124 loc) · 5.24 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[build-system]
requires = ["scikit-build-core>=0.9.1", "pybind11"]
build-backend = "scikit_build_core.build"
# To bebug build backend, replace by:
# cf https://peps.python.org/pep-0517/#in-tree-build-backends
# requires = ["pybind11", "packaging", "pathspec"]
# build-backend = "scikit_build_core.build"
# backend-path = ["_backends/scikit-build-core/src/"]
[project]
name = "imgui-bundle"
version = "1.5.2" # Remember to mirror changes on line 2 of main CMakeLists!
description="Dear ImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!"
readme = "bindings/imgui_bundle/Readme_pypi.md"
authors = [ { name = "Pascal Thomet", email = "pthomet@gmail.com" } ]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"numpy",
"munch",
"glfw",
"PyOpenGL",
"pillow",
"pydantic",
]
[project.optional-dependencies]
test = ["pytest"]
[project.urls]
Homepage = "https://pthom.github.io/imgui_bundle/"
Documentation = "https://pthom.github.io/imgui_bundle/"
Repository = "https://github.com/pthom/imgui_bundle"
Issues = "https://github.com/pthom/imgui_bundle/issues"
Changelog = "https://github.com/pthom/imgui_bundle/blob/main/CHANGELOG.md"
[project.scripts]
demo_imgui_bundle="imgui_bundle.demos_python.demo_imgui_bundle:main"
imgui_bundle_demo="imgui_bundle.demos_python.demo_imgui_bundle:main"
[tool.scikit-build]
wheel.expand-macos-universal-tags = true
wheel.packages = ["bindings/imgui_bundle"]
cmake.version = ">=3.26.1"
# cmake.verbose = true
# logging.level = "INFO"
[tool.isort]
profile = "black"
#####################################
# Wheels options
#####################################
[tool.cibuildwheel]
build-verbosity = 1
# Target python versions:
build = ["cp310-*", "cp311-*", "cp312-*"]
# 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="14.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" }
environment-pass = ["IMMVISION_OPENCV_GIT_REPO"] # pass alternative git repo to docker build containers
# 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" }