Skip to content

Commit

Permalink
GH-40566: [C++] Fix 3.12 Python support (#40322)
Browse files Browse the repository at this point in the history
sysconfig is available since Python 3.2

Tested on nixpkgs and works as expected

### Rationale for this change

Support Python 3.12

### What changes are included in this PR?

### Are these changes tested?

Yes

### Are there any user-facing changes?

No

* GitHub Issue: #40566

Authored-by: Sandro <sandro.jaeckel@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
  • Loading branch information
SuperSandro2000 committed Mar 15, 2024
1 parent 5cd64e7 commit d3d96a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/cmake_modules/FindPython3Alt.cmake
Expand Up @@ -67,7 +67,7 @@ get_target_property(NUMPY_INCLUDE_DIRS Python3::NumPy INTERFACE_INCLUDE_DIRECTOR
# detect it ourselves.
# (https://gitlab.kitware.com/cmake/cmake/issues/20408)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
"from distutils import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"
"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"
RESULT_VARIABLE _PYTHON_RESULT
OUTPUT_VARIABLE _PYTHON_STDOUT
ERROR_VARIABLE _PYTHON_STDERR)
Expand Down

0 comments on commit d3d96a1

Please sign in to comment.