-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (90 loc) · 4.48 KB
/
Copy pathpyproject.toml
File metadata and controls
105 lines (90 loc) · 4.48 KB
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
# SPDX-FileCopyrightText: (C) 2026 user4223 and (other) contributors to ticket-decoder <https://github.com/user4223/ticket-decoder>
# SPDX-License-Identifier: GPL-3.0-or-later
[project]
name = "ticket-decoder"
version = "v0.20.1"
description = "Train ticket barcode to json decoding library, using zxing-cpp decoding in combination with record interpreter, to transform content into json structure"
license = "GPL-3.0-or-later"
authors = [ { name = "user4223" } ]
readme = "source/python/README.md"
keywords = ["train-ticket", "barcode", "aztec-code", "uic918", "vdv", "sbb", "oebb"]
requires-python = ">=3.13"
dependencies = []
[project.urls]
Repository = "https://github.com/user4223/ticket-decoder"
Issues = "https://github.com/user4223/ticket-decoder/issues"
[tool.uv]
cache-keys = [
{ file = "pyproject.toml" },
{ file = "**/conanfile.py" },
{ file = "**/CMakeLists.txt" },
{ file = "source/**/*.{h,c,cpp}" }
]
[build-system]
requires = ["scikit-build-core-conan"]
build-backend = "scikit_build_core_conan.build"
[tool.cibuildwheel.environment]
CMAKE_POLICY_VERSION_MINIMUM = "3.5" # easylogging has a quite old cmake requirement, that fails with cmake >= 4 due to deprecation
[tool.cibuildwheel]
build-verbosity = 2 # https://cibuildwheel.pypa.io/en/stable/options/#build-verbosity
build = [ # https://cibuildwheel.pypa.io/en/stable/options/#build-skip
"cp31?-macosx_arm64",
# "cp31?-macosx_x86_64", # No runner right now other than self hosted and thereby untrusted
"cp31?-manylinux_aarch64",
"cp31?-manylinux_x86_64"
]
manylinux-aarch64-image = "manylinux_2_34" # https://cibuildwheel.pypa.io/en/stable/options/#linux-image
manylinux-x86_64-image = "manylinux_2_34"
before-test = "mkdir -p cert && curl --output cert/UIC_PublicKeys.xml -s 'https://railpublickey.uic.org/download.php'"
test-command = """python -c '
from ticket_decoder import DecoderFacade
decoder = DecoderFacade()
result = decoder.decode_base64("I1VUMDExMDgwMDAwMDEwLQIUNDW6hIQDALJXkeinsN8LGG6JJ9kCFQCbqcKtFige6dO0zRFzeaDKaTWlgwAAADAzNTh4nAuN93B1dDEwNDAwNTY0sDCwCIkwc3cxCGRAAgZmhgZGBkZGhibGFgYuri6uofEhPo6RQE1GRmYBPo6eBgZAnSZA0tDIAATMvXMSi4tTrQxMgRwjiJhZQGpRsZ4VmG1oAbLQwNItMaMoO7GoJBXMhWg2NHI/vCenJDM9OzWzxMrA0NAUZAJQ3sQwLD9PwchAz9BAD+QaBQNLoGlcTpnFCkaGCEFjkBUmhpYg46CmmgJ5RlCeqYEx3AFGpsHJGTmpxeWZ6boe+TnFJamZebohmcnZqSWh8W4+rhGGxiD7kzYxtD3kPbjo9A1RQY5GVpkWi5WJWyp6NBZwNTZwzDj07AXfsmMXnlw686KMsaFJiUGeoUGQr5STL+lMk7A0X1/Uh08vp7AvPNYgmMF0wKFBEqeVoDAMCwXHhBFDCjDYWRn1+pp0JUqYf0mUO4Z4MDiGSjAwCBqABNnvsAoIdzAIAAAFHHyh")
print(result)
'"""
[tool.cibuildwheel.linux]
before-build = "rm -rf build/Release"
repair-wheel-command = "unzip -o -j -d .libs {wheel} \"*lib*.so\" && LD_LIBRARY_PATH=`pwd`/.libs auditwheel repair -w {dest_dir} {wheel}"
[tool.scikit-build-core-conan]
path = "."
build = "missing"
output-folder = "build/Release"
settings-all = [
"build_type=Release",
"compiler.cppstd=20"
]
options-all = [
"&:with_system_boost=False",
"&:with_ticket_analyzer=False",
"&:with_ticket_decoder=False",
"&:with_python_module=True",
"&:with_square_detector=False",
"&:with_classifier_detector=False",
"&:with_barcode_decoder=True",
"&:with_pdf_input=True",
"&:with_signature_verifier=True",
"&:with_uic_interpreter=True",
"&:with_vdv_interpreter=True",
"&:with_sbb_interpreter=True"
]
[[tool.scikit-build-core-conan.local-recipes]]
path = "etc/poppler/conanfile.py"
[tool.scikit-build]
strict-config = true
logging.level = "WARNING"
build-dir = "build/Release"
build.verbose = false
build.requires = ["conan>=2.28", "nanobind"]
build.targets = ["ticket_decoder"]
cmake.build-type = "Release"
cmake.args = [ "--toolchain build/Release/build/Release/generators/conan_toolchain.cmake", "-G Ninja" ]
cmake.define = { CMAKE_BUILD_TYPE = "Release", CMAKE_POLICY_VERSION_MINIMUM = "3.5" }
sdist.exclude = ["build/", "conan2/", ".github/", ".vscode/", "dist/", "out/", "venv/", "*.log", "*.pnm", "setup.*.sh"]
sdist.include = ["doc/*", "cert/*", "images/*"]
sdist.inclusion-mode = "default"
sdist.reproducible = true
wheel.license-files = ["LICENSES/*"]
wheel.cmake = true
wheel.platlib = "platlib" # Target the platlib (platform specific) or the purelib (pure python and platform independent)
wheel.expand-macos-universal-tags = true # Fill out extra tags that are not required
install.strip = false # Whether to strip the binaries