From: Jiaying Song <[email protected]> Changelog: https://github.com/scikit-build/ninja-python-distributions/releases
Upstream commit [1] switched build system from scikit-build to scikit-build-core, which changed pyproject.toml structure and rewrote __init__.py. Update patches accordingly: - no-scikit-build.patch: rewrite for new pyproject.toml structure, replace scikit-build-core with setuptools, and remove 'readme' from dynamic fields as setuptools cannot handle the fancy-pypi-readme plugin. - run-ninja-from-path.patch: drop. Old version imported skbuild modules in __init__.py which caused ImportError in OE since scikit-build is not installed. New version replaced these imports with stdlib sysconfig, so the patch is no longer needed. - CMakeLists.txt: drop. This was a stub file added to prevent scikit-build from failing when it could not find CMakeLists.txt. Since we now use setuptools which does not require it, the file can be removed. [1] https://github.com/scikit-build/ninja-python-distributions/commit/f3b4a786be Signed-off-by: Jiaying Song <[email protected]> --- .../python/python3-ninja/CMakeLists.txt | 9 ---- .../python3-ninja/no-scikit-build.patch | 39 +++++++--------- .../python3-ninja/run-ninja-from-path.patch | 44 ------------------- ...ja_1.11.1.1.bb => python3-ninja_1.13.0.bb} | 5 +-- 4 files changed, 17 insertions(+), 80 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt delete mode 100644 meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch rename meta-python/recipes-devtools/python/{python3-ninja_1.11.1.1.bb => python3-ninja_1.13.0.bb} (73%) diff --git a/meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt b/meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt deleted file mode 100644 index 04fa451e72..0000000000 --- a/meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(NinjaPythonDistributions) - -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH}) - -install(CODE " - message(STATUS \"Install ninja project\") -") diff --git a/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch b/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch index b7d191e244..4dfbb2675a 100644 --- a/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch +++ b/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch @@ -1,31 +1,22 @@ -We don't need to build ninja so there's no need to use scikit-build, -as we just need the python module with it's one ninja() function. +We don't need to build ninja so there's no need to use scikit-build-core, +as we just need the python module with its one ninja() function. Upstream-Status: Inappropriate Signed-off-by: Ross Burton <[email protected]> +Signed-off-by: Jiaying Song <[email protected]> -diff --git a/pyproject.toml b/pyproject.toml -index b895c20..577b642 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -2,7 +2,6 @@ - requires = [ - "setuptools >=42", - "setuptools-scm[toml]", -- "scikit-build", - ] - build-backend = "setuptools.build_meta" +@@ -1,5 +1,4 @@ + [build-system] +-requires = ["scikit-build-core>=0.10"] +-build-backend = "backend" +-backend-path = ["_build_backend"] ++requires = ["setuptools", "setuptools-scm"] ++build-backend = "setuptools.build_meta" -diff --git a/setup.py b/setup.py -index dbe1fbc..3259754 100755 ---- a/setup.py -+++ b/setup.py -@@ -5,7 +5,7 @@ import os - import sys - from distutils.text_file import TextFile - --from skbuild import setup -+from setuptools import setup - - # Add current folder to path - # This is required to import versioneer in an isolated pip build +@@ -7,3 +6,3 @@ + name = "ninja" +-dynamic = ["version", "readme"] ++dynamic = ["version"] + description = "Ninja is a small build system with a focus on speed" diff --git a/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch b/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch deleted file mode 100644 index 0068efcc3a..0000000000 --- a/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch +++ /dev/null @@ -1,44 +0,0 @@ -There's no need to hunt around source or install trees when we're just running ninja -from PATH. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton <[email protected]> - -diff --git a/src/ninja/__init__.py b/src/ninja/__init__.py -index f83767e..31bb926 100644 ---- a/src/ninja/__init__.py -+++ b/src/ninja/__init__.py -@@ -19,32 +19,9 @@ except ImportError: - os.path.dirname(__file__), '../../Ninja-src/misc'))) - from ninja_syntax import Writer, escape, expand # noqa: F401 - --DATA = os.path.join(os.path.dirname(__file__), 'data') -- --# Support running tests from the source tree --if not os.path.exists(DATA): -- from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR -- from skbuild.constants import set_skbuild_plat_name -- -- if platform.system().lower() == "darwin": -- # Since building the project specifying --plat-name or CMAKE_OSX_* variables -- # leads to different SKBUILD_DIR, the code below attempt to guess the most -- # likely plat-name. -- _skbuild_dirs = os.listdir(os.path.join(os.path.dirname(__file__), '..', '..', '_skbuild')) -- if _skbuild_dirs: -- _likely_plat_name = '-'.join(_skbuild_dirs[0].split('-')[:3]) -- set_skbuild_plat_name(_likely_plat_name) -- -- _data = os.path.abspath(os.path.join( -- os.path.dirname(__file__), '..', '..', SKBUILD_CMAKE_INSTALL_DIR(), 'src/ninja/data')) -- if os.path.exists(_data): -- DATA = _data -- --BIN_DIR = os.path.join(DATA, 'bin') -- - - def _program(name, args): -- return subprocess.call([os.path.join(BIN_DIR, name)] + args, close_fds=False) -+ return subprocess.call([name] + args, close_fds=False) - - - def ninja(): diff --git a/meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb b/meta-python/recipes-devtools/python/python3-ninja_1.13.0.bb similarity index 73% rename from meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb rename to meta-python/recipes-devtools/python/python3-ninja_1.13.0.bb index 8f2e6528db..1591be0912 100644 --- a/meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb +++ b/meta-python/recipes-devtools/python/python3-ninja_1.13.0.bb @@ -6,10 +6,9 @@ PYPI_PACKAGE = "ninja" PYPI_ARCHIVE_NAME_PREFIX = "pypi-" inherit pypi python_setuptools_build_meta -SRC_URI[sha256sum] = "9d793b08dd857e38d0b6ffe9e6b7145d7c485a42dcfea04905ca0cdb6017cc3c" +SRC_URI[sha256sum] = "4a40ce995ded54d9dc24f8ea37ff3bf62ad192b547f6c7126e7e25045e76f978" -SRC_URI += "file://no-scikit-build.patch \ - file://run-ninja-from-path.patch" +SRC_URI += "file://no-scikit-build.patch " DEPENDS += "python3-setuptools-scm-native" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#125270): https://lists.openembedded.org/g/openembedded-devel/message/125270 Mute This Topic: https://lists.openembedded.org/mt/118341956/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
