mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-28 21:52:39 +00:00
- Fixes https://github.com/termux/termux-packages/issues/25362 - This software is a very thin python wrapper around CMake that is encapsulated by a large amount of Python and CMake build system boilerplate. It serves the purpose of making these three commands work in Termux that currently do not work, for example as a convenient way to help resolve errors in projects or scripts that might internally use one of these three commands instead of invoking `cmake` directly: - `pip install cmake` - `python -m cmake` - `python -c 'import cmake'` - Normally, this software is distributed through PyPi at https://pypi.org/project/cmake/, but since that version only works on GNU/Linux, Mac, Windows and Alpine Linux, in this package, the software is patched to ensure it uses the binaries from the existing Termux `cmake` package as its backend, and does not conflict with the `cmake` package.
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
Redirects all paths to the normally-bundled cmake
|
|
to the paths of the cmake package this package depends on.
|
|
|
|
--- a/src/cmake/__init__.py
|
|
+++ b/src/cmake/__init__.py
|
|
@@ -25,15 +25,7 @@ def __dir__() -> list[str]:
|
|
return __all__
|
|
|
|
|
|
-cmake_executable_path = None
|
|
-cmake_files = distribution("cmake").files
|
|
-assert cmake_files is not None, "This is the cmake package so it must be installed and have files"
|
|
-for script in cmake_files:
|
|
- if str(script).startswith("cmake/data/bin/cmake"):
|
|
- resolved_script = Path(script.locate()).resolve(strict=True)
|
|
- cmake_executable_path = resolved_script.parents[1]
|
|
- break
|
|
-CMAKE_DATA = str(cmake_executable_path) if cmake_executable_path else None
|
|
+CMAKE_DATA = "@TERMUX_PREFIX@"
|
|
|
|
assert CMAKE_DATA is not None
|
|
assert os.path.exists(CMAKE_DATA)
|
|
--- a/pyproject.toml
|
|
+++ b/pyproject.toml
|
|
@@ -38,13 +38,6 @@ Source = "https://github.com/scikit-build/cmake-python-distributions"
|
|
"Mailing list" = "https://groups.google.com/forum/#!forum/scikit-build"
|
|
"Bug Tracker" = "https://github.com/scikit-build/cmake-python-distributions/issues"
|
|
|
|
-[project.scripts]
|
|
-ccmake = "cmake:ccmake"
|
|
-cmake = "cmake:cmake"
|
|
-cpack = "cmake:cpack"
|
|
-ctest = "cmake:ctest"
|
|
-
|
|
-
|
|
[dependency-groups]
|
|
test = [
|
|
"coverage>=4.2",
|