summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-ninja')
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch31
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch39
2 files changed, 67 insertions, 3 deletions
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch
new file mode 100644
index 0000000000..276fb50172
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch
@@ -0,0 +1,31 @@
+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.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/pyproject.toml b/pyproject.toml
+index b895c20..577b642 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,7 +1,6 @@
+ [build-system]
+ requires = [
+ "setuptools>=42",
+- "scikit-build>=0.12",
+ ]
+ 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
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch
index 26bd037373..0068efcc3a 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch
@@ -1,7 +1,40 @@
---- ninja-1.11.1/src/ninja/__init__.py.old 2022-11-05 09:49:23.000000000 +0100
-+++ ninja-1.11.1/src/ninja/__init__.py 2023-03-10 09:45:13.452082888 +0100
-@@ -44,7 +44,7 @@
+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 <ross.burton@arm.com>
+
+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)