add pytango
This commit is contained in:
parent
c88ae6b40c
commit
763971d65b
@ -0,0 +1,12 @@
|
|||||||
|
SUMMARY = "Build backend for Python that uses CMake to build extension modules."
|
||||||
|
LICENSE = "Apache-2.0"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b4e748e5f102e31c9390dcd6fa66f09"
|
||||||
|
|
||||||
|
PYPI_PACKAGE = "scikit_build_core"
|
||||||
|
SRC_URI += "file://0001-use-env-cmake-and-ninja.patch"
|
||||||
|
|
||||||
|
DEPENDS = "python3-hatch-vcs-native"
|
||||||
|
RDEPENDS:${PN} = "cmake python3-cmake python3-ninja python3-pyproject-metadata"
|
||||||
|
inherit allarch python3targetconfig pypi python_hatchling
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
--- scikit_build_core-0.8.2/src/scikit_build_core/program_search.py 2020-02-02 01:00:00.000000000 +0100
|
||||||
|
+++ scikit_build_core-0.8.2-yocto/src/scikit_build_core/program_search.py 2024-03-14 14:35:34.768039243 +0100
|
||||||
|
@@ -38,12 +38,12 @@ def _get_cmake_path(*, module: bool = Tr
|
||||||
|
"""
|
||||||
|
Get the path to CMake.
|
||||||
|
"""
|
||||||
|
- if module:
|
||||||
|
- with contextlib.suppress(ImportError):
|
||||||
|
- # If a "cmake" directory exists, this will also ImportError
|
||||||
|
- from cmake import CMAKE_BIN_DIR
|
||||||
|
-
|
||||||
|
- yield Path(CMAKE_BIN_DIR) / "cmake"
|
||||||
|
+# if module:
|
||||||
|
+# with contextlib.suppress(ImportError):
|
||||||
|
+# # If a "cmake" directory exists, this will also ImportError
|
||||||
|
+# from cmake import CMAKE_BIN_DIR
|
||||||
|
+#
|
||||||
|
+# yield Path(CMAKE_BIN_DIR) / "cmake"
|
||||||
|
|
||||||
|
candidates = ("cmake3", "cmake")
|
||||||
|
for candidate in candidates:
|
||||||
|
@@ -57,11 +57,11 @@ def _get_ninja_path(*, module: bool = Tr
|
||||||
|
Get the path to ninja.
|
||||||
|
"""
|
||||||
|
|
||||||
|
- if module:
|
||||||
|
- with contextlib.suppress(ImportError):
|
||||||
|
- from ninja import BIN_DIR
|
||||||
|
-
|
||||||
|
- yield Path(BIN_DIR) / "ninja"
|
||||||
|
+# if module:
|
||||||
|
+# with contextlib.suppress(ImportError):
|
||||||
|
+# from ninja import BIN_DIR
|
||||||
|
+#
|
||||||
|
+# yield Path(BIN_DIR) / "ninja"
|
||||||
|
|
||||||
|
# Matches https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeNinjaFindMake.cmake
|
||||||
|
candidates = ("ninja-build", "ninja", "samu")
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
require python3-scikit-build-core.inc
|
||||||
|
|
||||||
|
# pypi package for 0.8.2
|
||||||
|
SRC_URI[sha256sum] = "50ec24b9568c9aa6e27233deeb2978932bc79856212b30575cbfa4049655c436"
|
||||||
25
recipes-python/pytango/python3-pytango.inc
Normal file
25
recipes-python/pytango/python3-pytango.inc
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
SUMMARY = "Python binding for Tango"
|
||||||
|
LICENSE = "LGPL-3.0"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6fabb2820b872d5b3106bddba78021f5"
|
||||||
|
|
||||||
|
DEPENDS = "libtango boost omniorb zeromq cppzmq python3-numpy-native python3-scikit-build-core-native"
|
||||||
|
RDEPENDS:${PN} = "python3 python3-numpy python3-packaging"
|
||||||
|
|
||||||
|
# for toolchain.cmake file
|
||||||
|
inherit cmake
|
||||||
|
inherit python3targetconfig pkgconfig pypi python_pep517
|
||||||
|
|
||||||
|
# TODO: Why is python include dir not found automatically?
|
||||||
|
export CMAKE_ARGS = "-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake -DPython_INCLUDE_DIR=${STAGING_DIR_TARGET}${includedir}/${PYTHON_DIR}"
|
||||||
|
|
||||||
|
do_configure:prepend() {
|
||||||
|
# only depend on pytango's hard numpy requirement, as the only numpy
|
||||||
|
# available is the one provided by python3-numpy package anyway and
|
||||||
|
# the one provided by oldest-supported-numpy is not
|
||||||
|
required_numpy=`cat ${S}/pyproject.toml | grep -F numpy | grep -Fv requires | awk -F'[()]' '{print $2}'`
|
||||||
|
sed -i "s/oldest-supported-numpy/numpy ($required_numpy)/" ${S}/pyproject.toml
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}"
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "nativesdk"
|
||||||
6
recipes-python/pytango/python3-pytango_9.5.0.bb
Normal file
6
recipes-python/pytango/python3-pytango_9.5.0.bb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
require python3-pytango.inc
|
||||||
|
|
||||||
|
# pypi package for 9.5.0
|
||||||
|
SRC_URI[sha256sum] = "559cb367c8f336c382cfcc3fb86a523a599c6f01d00bc9ad89ca7a363793182c"
|
||||||
|
|
||||||
|
PREFERRED_VERSION_libtango = "9.5.%"
|
||||||
Loading…
x
Reference in New Issue
Block a user