diff options
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch | 39 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch | 44 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-ninja_1.13.0.bb (renamed from meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb) | 5 |
4 files changed, 17 insertions, 80 deletions
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 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.15) | ||
| 2 | |||
| 3 | project(NinjaPythonDistributions) | ||
| 4 | |||
| 5 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH}) | ||
| 6 | |||
| 7 | install(CODE " | ||
| 8 | message(STATUS \"Install ninja project\") | ||
| 9 | ") | ||
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 @@ | |||
| 1 | We don't need to build ninja so there's no need to use scikit-build, | 1 | We don't need to build ninja so there's no need to use scikit-build-core, |
| 2 | as we just need the python module with it's one ninja() function. | 2 | as we just need the python module with its one ninja() function. |
| 3 | 3 | ||
| 4 | Upstream-Status: Inappropriate | 4 | Upstream-Status: Inappropriate |
| 5 | Signed-off-by: Ross Burton <ross.burton@arm.com> | 5 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
| 6 | Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com> | ||
| 6 | 7 | ||
| 7 | diff --git a/pyproject.toml b/pyproject.toml | ||
| 8 | index b895c20..577b642 100644 | ||
| 9 | --- a/pyproject.toml | 8 | --- a/pyproject.toml |
| 10 | +++ b/pyproject.toml | 9 | +++ b/pyproject.toml |
| 11 | @@ -2,7 +2,6 @@ | 10 | @@ -1,5 +1,4 @@ |
| 12 | requires = [ | 11 | [build-system] |
| 13 | "setuptools >=42", | 12 | -requires = ["scikit-build-core>=0.10"] |
| 14 | "setuptools-scm[toml]", | 13 | -build-backend = "backend" |
| 15 | - "scikit-build", | 14 | -backend-path = ["_build_backend"] |
| 16 | ] | 15 | +requires = ["setuptools", "setuptools-scm"] |
| 17 | build-backend = "setuptools.build_meta" | 16 | +build-backend = "setuptools.build_meta" |
| 18 | 17 | ||
| 19 | diff --git a/setup.py b/setup.py | 18 | @@ -7,3 +6,3 @@ |
| 20 | index dbe1fbc..3259754 100755 | 19 | name = "ninja" |
| 21 | --- a/setup.py | 20 | -dynamic = ["version", "readme"] |
| 22 | +++ b/setup.py | 21 | +dynamic = ["version"] |
| 23 | @@ -5,7 +5,7 @@ import os | 22 | description = "Ninja is a small build system with a focus on speed" |
| 24 | import sys | ||
| 25 | from distutils.text_file import TextFile | ||
| 26 | |||
| 27 | -from skbuild import setup | ||
| 28 | +from setuptools import setup | ||
| 29 | |||
| 30 | # Add current folder to path | ||
| 31 | # This is required to import versioneer in an isolated pip build | ||
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 @@ | |||
| 1 | There's no need to hunt around source or install trees when we're just running ninja | ||
| 2 | from PATH. | ||
| 3 | |||
| 4 | Upstream-Status: Inappropriate | ||
| 5 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 6 | |||
| 7 | diff --git a/src/ninja/__init__.py b/src/ninja/__init__.py | ||
| 8 | index f83767e..31bb926 100644 | ||
| 9 | --- a/src/ninja/__init__.py | ||
| 10 | +++ b/src/ninja/__init__.py | ||
| 11 | @@ -19,32 +19,9 @@ except ImportError: | ||
| 12 | os.path.dirname(__file__), '../../Ninja-src/misc'))) | ||
| 13 | from ninja_syntax import Writer, escape, expand # noqa: F401 | ||
| 14 | |||
| 15 | -DATA = os.path.join(os.path.dirname(__file__), 'data') | ||
| 16 | - | ||
| 17 | -# Support running tests from the source tree | ||
| 18 | -if not os.path.exists(DATA): | ||
| 19 | - from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR | ||
| 20 | - from skbuild.constants import set_skbuild_plat_name | ||
| 21 | - | ||
| 22 | - if platform.system().lower() == "darwin": | ||
| 23 | - # Since building the project specifying --plat-name or CMAKE_OSX_* variables | ||
| 24 | - # leads to different SKBUILD_DIR, the code below attempt to guess the most | ||
| 25 | - # likely plat-name. | ||
| 26 | - _skbuild_dirs = os.listdir(os.path.join(os.path.dirname(__file__), '..', '..', '_skbuild')) | ||
| 27 | - if _skbuild_dirs: | ||
| 28 | - _likely_plat_name = '-'.join(_skbuild_dirs[0].split('-')[:3]) | ||
| 29 | - set_skbuild_plat_name(_likely_plat_name) | ||
| 30 | - | ||
| 31 | - _data = os.path.abspath(os.path.join( | ||
| 32 | - os.path.dirname(__file__), '..', '..', SKBUILD_CMAKE_INSTALL_DIR(), 'src/ninja/data')) | ||
| 33 | - if os.path.exists(_data): | ||
| 34 | - DATA = _data | ||
| 35 | - | ||
| 36 | -BIN_DIR = os.path.join(DATA, 'bin') | ||
| 37 | - | ||
| 38 | |||
| 39 | def _program(name, args): | ||
| 40 | - return subprocess.call([os.path.join(BIN_DIR, name)] + args, close_fds=False) | ||
| 41 | + return subprocess.call([name] + args, close_fds=False) | ||
| 42 | |||
| 43 | |||
| 44 | 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 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" | |||
| 6 | PYPI_ARCHIVE_NAME_PREFIX = "pypi-" | 6 | PYPI_ARCHIVE_NAME_PREFIX = "pypi-" |
| 7 | 7 | ||
| 8 | inherit pypi python_setuptools_build_meta | 8 | inherit pypi python_setuptools_build_meta |
| 9 | SRC_URI[sha256sum] = "9d793b08dd857e38d0b6ffe9e6b7145d7c485a42dcfea04905ca0cdb6017cc3c" | 9 | SRC_URI[sha256sum] = "4a40ce995ded54d9dc24f8ea37ff3bf62ad192b547f6c7126e7e25045e76f978" |
| 10 | 10 | ||
| 11 | SRC_URI += "file://no-scikit-build.patch \ | 11 | SRC_URI += "file://no-scikit-build.patch " |
| 12 | file://run-ninja-from-path.patch" | ||
| 13 | 12 | ||
| 14 | DEPENDS += "python3-setuptools-scm-native" | 13 | DEPENDS += "python3-setuptools-scm-native" |
| 15 | 14 | ||
