-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (122 loc) · 6.07 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (122 loc) · 6.07 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
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
[build-system]
requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"
[project]
name = "karabo-aravis-cameras"
description = "A Karabo device to control and acquire data from Aravis compatible cameras."
readme = "README.md"
requires-python = "==3.12.*"
license = "GPL-3.0"
keywords = ["Karabo", "SCADA", "camera", "control system", "aravis"]
authors = [{ name = "European XFEL GmbH", email = "opensource@xfel.eu" }]
maintainers = [
{ name = "A. Parenti", email = "andrea.parenti@xfel.eu" },
]
dynamic = ["version"]
# Classifiers help users find your project by categorizing it.
#
# For a list of valid classifiers, see https://pypi.org/classifiers/
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 5 - Production/Stable",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
]
# This field lists other packages that your project depends on to run.
# Any package you put here will be installed by pip when your project is
# installed, so they must be valid existing projects.
#
# For an analysis of this field vs pip's requirements files see:
# https://packaging.python.org/discussions/install-requires-vs-requirements/
dependencies = [
"karabo[cpp]",
]
[project.optional-dependencies]
# List URLs that are relevant to your project
#
# This field corresponds to the "Project-URL" and "Home-Page" metadata fields:
# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
# https://packaging.python.org/specifications/core-metadata/#home-page-optional
#
# Examples listed include a pattern for specifying where the package tracks
# issues, where the source is hosted, where to say thanks to the package
# maintainers, and where to support the project financially. The key is
# what's used to render the link text on PyPI.
[project.urls]
"Homepage" = "https://github.com/European-XFEL/Karabo-aravisCameras"
"Bug Reports" = "https://github.com/European-XFEL/Karabo-aravisCameras/issues"
"Source" = "https://github.com/European-XFEL/Karabo-aravisCameras"
[tool.scikit-build]
cmake.build-type = "Release"
logging.level = "INFO"
build.verbose = true
# need to be explicty here, as otherwise git versioning will
# not work
build-dir = "./build"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/_version.py"]
build.requires = ["conan", "karabo.cpp"]
# avoid default
search.site-packages = false
wheel.install-dir = "karabo_aravis_cameras"
# Add any CMAKE defines (without the D) prefix here. These should be e.g.
# defines present in the .install.sh script's call to CMake.
[tool.scikit-build.cmake.define]
BUILD_TESTS="0"
Boost_NO_BOOST_CMAKE="ON"
Boost_NO_SYSTEM_PATHS="ON"
DEVICE_SERVER_EXECUTABLE="karabo-aravis-cameras-server"
[tool.scikit-build.wheel.packages]
# the package path should match what we specified in the project name, and PACKAGE for ci-create-cpp-shim.py
"karabo_aravis_cameras/shims" = "python/src/shims"
[tool.cibuildwheel]
# change this if docker is available (and podman not)
container-engine = "podman"
# Karabo requires a GCC and glibc version that support C++20
# The usual manylinux2014 version is to old for this (it's Centos7 based).
# We thus use manylinux_x_y, with glibc version 2.28.
# Quay.io hosts the pypa refence builds.
archs = ["x86_64"]
skip = "*-musllinux*" # the daemontools don't compile on musllinux so we skip it here as well
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
# we need a few things to happen before building:
# 1) install supporting libraries. For conan to work this should minimally
# include perl and gettext. We also need git installed to resolve versions.
# You can add other dependencies which are necessary, and which then will
# will be copied onto the wheel.
before-all = "dnf -y install perl gettext git opencv* libxml2-devel glib2-devel libusbx-devel gtest-devel libjpeg-turbo-devel"
# 2) - Here you should minimally install conan, karabo.cpp meson and ninja
# this will ensure that most Karabo based installers should work
# - Then, we call conan profile detect --force to have a vaild conan profile
# - Next python cibuild-deps.py [--skip-dependency] will resolve and install dependencies
#
# We can use the --skip-dependency option to avoid installing a dependency we've resolved through
# conan or even a system install in before-all
#
# - Finally, we run ci-create-cpp-shim.py PACKAGE CMD which will create shims for the entry point
# definition. Note that PACKAGE should match your package name, and
# CMD should match the DEVICE_SERVER_EXECUTABLE variable.
#
# to trigger any conan or karabo DEPENDS builds
#
# NOTE: this all needs to be done before-build, so it is done for any Python
# version we are building!
before-build = "pip3 install conan==2.5.0 'karabo.cpp' meson ninja && conan profile detect --force && python ci-build-deps.py --skip-dependency opencv-bin && python ci-create-cpp-shim.py karabo-aravis-cameras karabo-aravis-cameras-server"
# we need to help audit wheel find the karabo and karabo extern libs
repair-wheel-command = "LD_LIBRARY_PATH=/project/build/aravisCameras:/project/tmp/karabo/lib:/project/tmp/karabo/extern/lib:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}"
test-requires = ["pytest", "karabo.native"]
# these are minimally required for a C++ server to start
before-test = "mkdir /karabo && mkdir /karabo/var && mkdir /karabo/var/data && mkdir /karabo/plugins"
test-command = "KARABO=/karabo KARABO_BROKER=amqp://xfel:karabo@exfl-broker-1:5672 pytest {project}/wheel_tests"
[project.scripts]
# the package path should match what we specified in the project name, and PACKAGE for ci-create-cpp-shim.py
# the command should match the CMD arg for ci-create-cpp-shim.py with "-" replaced by "_".
karabo-aravis-cameras-server = 'karabo_aravis_cameras.shims.entrypoints:karabo_aravis_cameras_server'
# for dynamic version specifiers
[tool.setuptools_scm]
write_to = "src/_version.py"