forked from TriBITSPub/TriBITS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request TriBITSPub#617 from TriBITSPub/610-python3-2
Fixup for change to find_package(Python3) (TriBITSPub#610)
- Loading branch information
Showing
4 changed files
with
54 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
#!/bin/sh | ||
# | ||
# Refactor a TriBITS project's CMake files for the change from | ||
# find_package(PythonInterp) to find_package(Python3) (see CHANGELOG.md entry | ||
# for 2024-10-08). | ||
# | ||
# Usage: | ||
# | ||
# to-python3.sh <base-dir> | ||
# | ||
# NOTES: | ||
# * This is safe to run multiple times on the same set of files. | ||
# * This is safe to run from the base project source tree. | ||
# * This will exclude any files under '.git/' | ||
# * This will exclude any files under 'tribits/' directories (so it will not mess up TriBITS) | ||
# | ||
|
||
_SCRIPT_DIR=`echo $0 | sed "s/\(.*\)\/to-python3[.]sh/\1/g"` | ||
baseDir=$1 | ||
find ${baseDir} -type f \ | ||
\( -name CMakeLists.txt -or -name "*.cmake" -or -name "*.cmake.in" -or -name "*.rst" \) \ | ||
! -wholename "*/.git/*" ! -wholename "*/tribits/*" \ | ||
-exec $_SCRIPT_DIR/token-replace.py -t PYTHON_EXECUTABLE -r Python3_EXECUTABLE -f {} ';' |