You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

78 lines
2.6 KiB

[build-system]
requires = [
"scikit-build-core >=0.12",
"wheel",
"nanobind >=2.11.0",
# Required for nanobind stub generation on Python < 3.11
'typing_extensions >=4.12;python_version<"3.11"',
]
build-backend = "scikit_build_core.build"
[project]
name = "zxing-cpp"
#dynamic = ["version"]
version = "3.1.0-rc1"
description = "Python bindings for the zxing-cpp barcode library"
readme = "README.md"
authors = [
{ name = "zxing-cpp community", email = "zxingcpp@gmail.com" },
]
license = "Apache-2.0"
keywords = ["barcode"]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Topic :: Multimedia :: Graphics",
]
[project.urls]
Homepage = "https://github.com/zxing-cpp/zxing-cpp"
Repository = "https://github.com/zxing-cpp/zxing-cpp.git"
Issues = "https://github.com/zxing-cpp/zxing-cpp/issues"
[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "build-system.requires"
cmake.build-type = "Release"
cmake.version = ">=3.18"
# This triggers the logic in CMakeLists.txt that copies zxing.cmake + LICENSE from parent,
# ensuring the sdist is self-contained.
sdist.cmake = true
sdist.exclude = ["zint/backend/tests", "zint/backend/tools"]
# Build stable ABI wheels for CPython 3.12+ (set via cibuildwheel override for cp312-* only)
#wheel.py-api = "cp312"
[tool.cibuildwheel]
# note: stable ABI and free-threaded builds are mutually exclusive,
# see https://nanobind.readthedocs.io/en/latest/free_threaded.html
build = ["cp310-*", "cp311-*", "cp312-*", "cp313t-*", "cp314t-*"]
enable = ["cpython-freethreading"]
skip = ["*musllinux*", "*-win32"]
# TODO: setup a "BEFORE" cmake build and link the python module to the prebuild libZXing.a
# see https://github.com/YannickJadoul/Parselmouth/blob/523c117aa780184345121f6ff8315670bc7d4d94/.github/workflows/wheels.yml#L120
before-test = "rm -f wrappers/python/zxingcpp.*"
build-verbosity = 1
test-command = "python {package}/test.py"
test-sources = ["wrappers/python/test.py"]
[tool.cibuildwheel.macos]
#archs = "universal2"
#environment = {CMAKE_OSX_ARCHITECTURES = "arm64;x86_64"}
[[tool.cibuildwheel.overrides]]
select = "*-macosx_x86_64"
# the default macOS target version for intel is 10.9; c++20 requires at least 10.15
environment = {MACOSX_DEPLOYMENT_TARGET = "10.15"}
[[tool.cibuildwheel.overrides]]
select = "cp312-*"
# required for the stable abi wheel tagging
environment = {SKBUILD_WHEEL_PY_API = "cp312"}