[libxml2] cmake: Don't check for Python 2
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] cmake: Don't check for Python 2
- Date: Sun, 4 Sep 2022 21:03:38 +0000 (UTC)
commit 243fdbc31c865c46bc4edc75860c4f92baf667fd
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sun Sep 4 19:13:14 2022 +0200
cmake: Don't check for Python 2
.gitlab-ci.yml | 1 -
CMakeLists.txt | 9 +--------
2 files changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b869b170..fea29bf5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -135,7 +135,6 @@ cmake:linux:clang:static:
$Env:MINGW_PACKAGE_PREFIX-libiconv
$Env:MINGW_PACKAGE_PREFIX-ninja
$Env:MINGW_PACKAGE_PREFIX-python
- $Env:MINGW_PACKAGE_PREFIX-python2
$Env:MINGW_PACKAGE_PREFIX-xz
$Env:MINGW_PACKAGE_PREFIX-zlib
- if (-not (Test-Path 7za.exe)) {
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cac51e37..85435586 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,14 +77,7 @@ endif()
if(LIBXML2_WITH_PYTHON)
check_include_files(unistd.h HAVE_UNISTD_H)
check_symbol_exists(F_GETFL fcntl.h HAVE_F_GETFL)
- if(HAVE_UNISTD_H AND HAVE_F_GETFL)
- find_package(Python COMPONENTS Interpreter Development REQUIRED)
- else()
- find_package(Python2 COMPONENTS Interpreter Development REQUIRED)
- add_library(Python::Python ALIAS Python2::Python)
- set(Python_EXECUTABLE ${Python2_EXECUTABLE})
- set(Python_SITEARCH ${Python2_SITEARCH})
- endif()
+ find_package(Python COMPONENTS Interpreter Development REQUIRED)
set(LIBXML2_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory")
endif()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]