Re: svn commit: r1935586 - in subversion/branches/xml-schema-validation-improvements: . build subversion/tests/cmdline subversion/tests/cmdline/svntest

Jun Omae <[email protected]>
Newsgroups gmane.comp.version-control.subversion.devel
Message-ID <[email protected]>
On 2026/06/26 2:38, Ivan Zhakov wrote:
>  
> [...] 
> 
>>         2. On Mac OS, there is an issue where FindPython3() in CMake locates a different Python binary that doesn't match `python` from the command line [1].
>>
>>         I still need to sort this part out.
> 
> 
>         It probably finds /usr/bin/python3 by default, which is Python 3.9 on recent versions of macOS. I think you'll have to set the Python3_ROOT_DIR hint. Given the python binary you get on the command line, try this:
> 
>         python3 -c 'import pathlib, sys; print(str(pathlib.Path(sys.executable).resolve().parent.parent))'
> 
> 
>     Haven't tested this yet, but thanks, it looks promising. 
> 
> I have implemented this approach in r1935637 <https://svn.apache.org/r1935637> and it worked. Thanks!
> 
> -- 
> Ivan Zhakov

Instead of using `Python3_*` hints, why not simply use the `Python3_EXECUTABLE` hint?
See also https://github.com/jun66j5/subversion/actions/runs/28207033484/job/83559921680

[[[
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 7ec51f1b8..37acfb894 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -186,12 +186,6 @@ jobs:
         if: runner.os == 'macOS'
         run: python -m pip -v --disable-pip-version-check install lxml==6.1.0 rnc2rng==2.7.0

-      - name: Set platform-specific values
-        id: platform
-        run: |
-          $PYTHON_ROOT=$(python -c 'import pathlib, sys; print(str(pathlib.Path(sys.executable).resolve().parent.parent))')
-          "python_root=$PYTHON_ROOT" >> "$env:GITHUB_OUTPUT"
-
       - name: Use LF for Git checkout
         run: |
           git config --global core.autocrlf false
@@ -214,10 +208,7 @@ jobs:
           -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installdir
           -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }}
           -DSVN_TEST_CONFIGURE_FOR_PARALLEL=ON
-          -DPython3_ROOT_DIR="${{ steps.platform.outputs.python_root }}"
-          -DPython3_FIND_REGISTRY=NEVER
-          -DPython3_FIND_STRATEGY=LOCATION
-          -DPython3_FIND_UNVERSIONED_NAMES=FIRST
+          -DPython3_EXECUTABLE="$( (Get-Command python).Path )"
           ${{ matrix.extra_config_opts }}

       - name: Build CMake
]]]

-- 
Jun Omae <[email protected]> (大前 潤)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.