mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:59:06 +08:00
[qtinterfaceframework|opencv] fix python stuff (#24041)
* add upstream patch * [skip actions] add the patch file * fine tune * [opencv] update portfiles to use vcpkg-get-python-packages * fix references * try another fix * add all deps * add code from tensorflow about venv * retry * fix file path * new approach * unset pythonhome * next unset * try this instead. * retry without the PYTHON_LIB_PATH stuff * try and error * next try * retry * typo fix * try updating * retry * more try and error * reorder * drop qface version * use qface 2.0.5 * bump watchdog * fix call on !windows * fine tuning * refactor function signature * update version * fix formating * version stuff * create dir before usage * fine tuning * version stuff * update and patch libilbc * formating stuff * fix version-string * version stuff * add license * version update * bump version * version stuff * version stuff Co-authored-by: Alexander Neumann <you@example.com> Co-authored-by: Stefano Sinigardi <stesinigardi@hotmail.com>
This commit is contained in:
parent
1200c2237d
commit
5afd32266c
39
ports/libilbc/absl.patch
Normal file
39
ports/libilbc/absl.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 016b46d37..4caa88fce 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -50,14 +50,12 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
-if((CMAKE_C_COMPILER_ID STREQUAL "GNU") OR
|
||||
- (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "GNU"))
|
||||
+if(0)
|
||||
set(CMAKE_C_FLAGS "-Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -fno-strict-aliasing")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2")
|
||||
endif()
|
||||
-if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
|
||||
- (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU"))
|
||||
+if(0)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
@@ -146,7 +144,8 @@ endif()
|
||||
## Configure input files
|
||||
#############################################################################
|
||||
|
||||
-include_directories(. abseil-cpp ${CMAKE_CURRENT_BINARY_DIR})
|
||||
+find_package(absl REQUIRED)
|
||||
+include_directories(. ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(ilbc_source_files
|
||||
modules/audio_coding/codecs/ilbc/abs_quant.c
|
||||
@@ -310,6 +310,7 @@ add_library(ilbc ${ilbc_source_files})
|
||||
generate_export_header(ilbc)
|
||||
set_target_properties(ilbc PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 3)
|
||||
set_target_properties(ilbc PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
+target_link_libraries(ilbc PRIVATE absl::core_headers)
|
||||
|
||||
add_executable(ilbc_test modules/audio_coding/codecs/ilbc/test/iLBC_test.c)
|
||||
target_link_libraries(ilbc_test ilbc)
|
@ -1,33 +1,29 @@
|
||||
set(ILBC_VERSION 3.0.3)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/TimothyGu/libilbc/releases/download/v${ILBC_VERSION}/libilbc-${ILBC_VERSION}.zip"
|
||||
FILENAME "libilbc-${ILBC_VERSION}.zip"
|
||||
SHA512 a5755db093529f6a3fd8fd47da63b57cffff1d3babef443d92f7c5a250ce8d1585adfba525c4037b142d9f00f1675a5054c172bf936be280dfcc22ed553c94c6
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
set(ILBC_VERSION 3.0.4)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${ILBC_VERSION}
|
||||
PATCHES do-not-build-ilbc_test.patch
|
||||
REPO TimothyGu/libilbc
|
||||
REF cd064edf2c6c104a4e1fd87b34fd24cfa6dbe401
|
||||
SHA512 323d32dbd54d5ef624940432bf19c29f5ead6f40bc84aba4261f067dfdc40cf4000e383f4dca65cd3b745a354a119a9e515949a1466af89c300cd7bf95991675
|
||||
PATCHES
|
||||
do-not-build-ilbc_test.patch
|
||||
absl.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCMAKE_INSTALL_DOCDIR=share/${PORT}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ilbc_export.h "#ifdef ILBC_STATIC_DEFINE" "#if 1")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ilbc_export.h" "#ifdef ILBC_STATIC_DEFINE" "#if 1")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,8 +1,15 @@
|
||||
{
|
||||
"name": "libilbc",
|
||||
"version-string": "3.0.3",
|
||||
"port-version": 1,
|
||||
"version": "3.0.4",
|
||||
"description": "Open source implementation of the Internet Low Bit Rate Codec (iLBC) / RFC 3951 codec from the WebRTC project.",
|
||||
"homepage": "https://github.com/TimothyGu/libilbc",
|
||||
"supports": "!(arm & uwp)"
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!(arm & uwp)",
|
||||
"dependencies": [
|
||||
"abseil",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -30,13 +30,9 @@ vcpkg_from_gitlab(
|
||||
HEAD_REF master
|
||||
PATCHES ${PATCHES}
|
||||
)
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}/Scripts")
|
||||
set(ENV{PYTHON} "${PYTHON3}")
|
||||
|
||||
x_vcpkg_get_python_packages(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES setuptools mako)
|
||||
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "3" OUT_PYTHON_VAR "PYTHON3" PACKAGES setuptools mako )
|
||||
|
||||
vcpkg_find_acquire_program(FLEX)
|
||||
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY )
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mesa",
|
||||
"version": "21.2.5",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "Mesa - The 3D Graphics Library",
|
||||
"homepage": "https://www.mesa3d.org/",
|
||||
"license": "MIT AND BSL-1.0 AND SGI-B-2.0",
|
||||
|
@ -64,53 +64,9 @@ endif()
|
||||
|
||||
set(WITH_PYTHON OFF)
|
||||
if("python" IN_LIST FEATURES)
|
||||
set(WITH_PYTHON ON)
|
||||
vcpkg_find_acquire_program(PYTHON2)
|
||||
get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON2_DIR}")
|
||||
vcpkg_add_to_path("${PYTHON2_DIR}/Scripts")
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "2" PACKAGES numpy OUT_PYTHON_VAR "PYTHON2")
|
||||
set(ENV{PYTHON} "${PYTHON2}")
|
||||
|
||||
function(vcpkg_get_python_package PYTHON_DIR )
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _vgpp "" "PYTHON_EXECUTABLE" "PACKAGES")
|
||||
|
||||
if(NOT _vgpp_PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PYTHON_EXECUTABLE!")
|
||||
endif()
|
||||
if(NOT _vgpp_PACKAGES)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PACKAGES!")
|
||||
endif()
|
||||
if(NOT _vgpp_PYTHON_DIR)
|
||||
get_filename_component(_vgpp_PYTHON_DIR "${_vgpp_PYTHON_EXECUTABLE}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(PYTHON_OPTION "")
|
||||
else()
|
||||
set(PYTHON_OPTION "--user")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25
|
||||
SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a
|
||||
HEAD_REF master
|
||||
)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" ${PYTHON_OPTION})
|
||||
endif()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} ${PYTHON_OPTION})
|
||||
endforeach()
|
||||
else()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package})
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
vcpkg_get_python_package(PYTHON_EXECUTABLE "${PYTHON2}" PACKAGES numpy)
|
||||
set(WITH_PYTHON ON)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "opencv2",
|
||||
"version": "2.4.13.7",
|
||||
"port-version": 11,
|
||||
"description": "computer vision library",
|
||||
"port-version": 12,
|
||||
"description": "Open Source Computer Vision Library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!uwp",
|
||||
@ -15,6 +15,10 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
|
@ -113,53 +113,9 @@ endif()
|
||||
|
||||
set(WITH_PYTHON OFF)
|
||||
if("python" IN_LIST FEATURES)
|
||||
set(WITH_PYTHON ON)
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}/Scripts")
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3")
|
||||
set(ENV{PYTHON} "${PYTHON3}")
|
||||
|
||||
function(vcpkg_get_python_package PYTHON_DIR )
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _vgpp "" "PYTHON_EXECUTABLE" "PACKAGES")
|
||||
|
||||
if(NOT _vgpp_PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PYTHON_EXECUTABLE!")
|
||||
endif()
|
||||
if(NOT _vgpp_PACKAGES)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PACKAGES!")
|
||||
endif()
|
||||
if(NOT _vgpp_PYTHON_DIR)
|
||||
get_filename_component(_vgpp_PYTHON_DIR "${_vgpp_PYTHON_EXECUTABLE}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(PYTHON_OPTION "")
|
||||
else()
|
||||
set(PYTHON_OPTION "--user")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25
|
||||
SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a
|
||||
HEAD_REF master
|
||||
)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" ${PYTHON_OPTION})
|
||||
endif()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} ${PYTHON_OPTION})
|
||||
endforeach()
|
||||
else()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package})
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
vcpkg_get_python_package(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES numpy)
|
||||
set(WITH_PYTHON ON)
|
||||
endif()
|
||||
|
||||
if("dnn" IN_LIST FEATURES)
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "opencv3",
|
||||
"version": "3.4.16",
|
||||
"port-version": 6,
|
||||
"description": "computer vision library",
|
||||
"port-version": 7,
|
||||
"description": "Open Source Computer Vision Library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
@ -14,6 +14,10 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
|
@ -138,52 +138,8 @@ if("python" IN_LIST FEATURES)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static AND VCPKG_TARGET_IS_WINDOWS)
|
||||
message(WARNING "The python module is currently unsupported on Windows when building static OpenCV libraries")
|
||||
else()
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}/Scripts")
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3")
|
||||
set(ENV{PYTHON} "${PYTHON3}")
|
||||
|
||||
function(vcpkg_get_python_package PYTHON_DIR )
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _vgpp "" "PYTHON_EXECUTABLE" "PACKAGES")
|
||||
|
||||
if(NOT _vgpp_PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PYTHON_EXECUTABLE!")
|
||||
endif()
|
||||
if(NOT _vgpp_PACKAGES)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PACKAGES!")
|
||||
endif()
|
||||
if(NOT _vgpp_PYTHON_DIR)
|
||||
get_filename_component(_vgpp_PYTHON_DIR "${_vgpp_PYTHON_EXECUTABLE}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(PYTHON_OPTION "")
|
||||
else()
|
||||
set(PYTHON_OPTION "--user")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25
|
||||
SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a
|
||||
HEAD_REF master
|
||||
)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" ${PYTHON_OPTION})
|
||||
endif()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} ${PYTHON_OPTION})
|
||||
endforeach()
|
||||
else()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package})
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
vcpkg_get_python_package(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES numpy)
|
||||
set(BUILD_opencv_python3 ON)
|
||||
set(WITH_PYTHON ON)
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "opencv4",
|
||||
"version": "4.5.5",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "computer vision library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "Apache-2.0",
|
||||
@ -14,6 +14,10 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
|
148
ports/qtinterfaceframework/49b44d4.diff
Normal file
148
ports/qtinterfaceframework/49b44d4.diff
Normal file
@ -0,0 +1,148 @@
|
||||
From 49b44d45c9eb5b5b98697f9ebb74204d45f0db38 Mon Sep 17 00:00:00 2001
|
||||
From: Dominik Holland <dominik.holland@qt.io>
|
||||
Date: Wed, 06 Apr 2022 15:43:23 +0200
|
||||
Subject: [PATCH] ifcodegen: Add a fallback mechanism for too recent python packages
|
||||
|
||||
After the virtualenv is created the generator is now verified to be
|
||||
working correctly. In case the generator doesn't work, an error
|
||||
message is shown, which suggests to reconfigure with
|
||||
|
||||
-DQT_USE_MINIMAL_QFACE_PACKAGES=TRUE
|
||||
|
||||
The new option will install the minimum required dependencies for
|
||||
qface.
|
||||
|
||||
Fixes: QTBUG-102348
|
||||
Pick-to: 6.2 6.3
|
||||
Change-Id: I59aca5848da8928e94c0d33a108735847d9260a2
|
||||
---
|
||||
|
||||
diff --git a/src/tools/ifcodegen/CMakeLists.txt b/src/tools/ifcodegen/CMakeLists.txt
|
||||
index 2d9e3a4..317d77f 100644
|
||||
--- a/src/tools/ifcodegen/CMakeLists.txt
|
||||
+++ b/src/tools/ifcodegen/CMakeLists.txt
|
||||
@@ -22,11 +22,13 @@
|
||||
if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
set(VIRTUALENV_ACTIVATE ${VIRTUALENV_PATH}/Scripts/activate.bat)
|
||||
set(VIRTUALENV_ACTIVATE_COMMAND ${VIRTUALENV_ACTIVATE})
|
||||
+ set(VIRTUALENV_PYTHON ${VIRTUALENV_PATH}/Scripts/python.exe)
|
||||
set(IFCODEGEN_BIN ${VIRTUALENV_PATH}/Scripts/qface.exe)
|
||||
set(DEPLOY_VIRTUALENV ${CMAKE_CURRENT_SOURCE_DIR}/deploy-virtualenv.bat)
|
||||
else()
|
||||
set(VIRTUALENV_ACTIVATE ${VIRTUALENV_PATH}/bin/activate)
|
||||
set(VIRTUALENV_ACTIVATE_COMMAND . ${VIRTUALENV_ACTIVATE})
|
||||
+ set(VIRTUALENV_PYTHON ${VIRTUALENV_PATH}/bin/python)
|
||||
set(IFCODEGEN_BIN ${VIRTUALENV_PATH}/bin/qface)
|
||||
set(DEPLOY_VIRTUALENV ${CMAKE_CURRENT_SOURCE_DIR}/deploy-virtualenv.sh)
|
||||
endif()
|
||||
@@ -63,6 +65,15 @@
|
||||
# someone is working on the qface sources
|
||||
file(GLOB_RECURSE IFCODEGEN_SOURCE_FILES ${IFCODEGEN_SOURCE_DIR}/*.py)
|
||||
|
||||
+ # If the upstream python packages introduce a regression this option can be used to install
|
||||
+ # the minimum version for all required python package and produce a working setup
|
||||
+ # Those packages might be outdated and may contain security holes, but they are known to be
|
||||
+ # working.
|
||||
+ set(INSTALL_MINIMAL_QFACE_PACKAGES_COMMAND)
|
||||
+ if (QT_USE_MINIMAL_QFACE_PACKAGES)
|
||||
+ set(INSTALL_MINIMAL_QFACE_PACKAGES_COMMAND COMMAND pip3 install -r ${IFCODEGEN_SOURCE_DIR}/requirements_minimal.txt)
|
||||
+ endif()
|
||||
+
|
||||
# On the CI we use the special wheel folder when available to not download all packages again on each build
|
||||
set(PYTHON3_WHEEL_CACHE "$ENV{PYTHON3_WHEEL_CACHE}" CACHE PATH "Python3 wheel cache")
|
||||
if (EXISTS "${PYTHON3_WHEEL_CACHE}")
|
||||
@@ -74,6 +85,7 @@
|
||||
|
||||
add_custom_command(OUTPUT ${IFCODEGEN_BIN}
|
||||
COMMAND ${VIRTUALENV_ACTIVATE_COMMAND}
|
||||
+ ${INSTALL_MINIMAL_QFACE_PACKAGES_COMMAND}
|
||||
COMMAND ${PIP3_INSTALL_COMMAND}
|
||||
DEPENDS ${VIRTUALENV_ACTIVATE}
|
||||
${IFCODEGEN_SOURCE_DIR}/requirements.txt
|
||||
@@ -82,16 +94,23 @@
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
COMMAND ${DEPLOY_VIRTUALENV} qtif_qface_virtualenv
|
||||
COMMAND ${CMAKE_COMMAND} -E touch .stamp-deploy_virtualenv
|
||||
- COMMAND ${CMAKE_COMMAND} -E touch .stamp-cmake-rerun
|
||||
DEPENDS ${IFCODEGEN_BIN}
|
||||
)
|
||||
|
||||
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/.stamp-generator-verified
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
+ COMMAND ${VIRTUALENV_PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/verify_generator.py
|
||||
+ COMMAND ${CMAKE_COMMAND} -E touch .stamp-generator-verified
|
||||
+ COMMAND ${CMAKE_COMMAND} -E touch .stamp-cmake-rerun
|
||||
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
+ COMMENT "Verifying generator"
|
||||
+ )
|
||||
+
|
||||
# main target which just relies on the stamp file to be uptodate
|
||||
add_custom_target(ifcodegen ALL
|
||||
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-generator-verified
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
)
|
||||
# Create the rerun cmake stamp file here to be able to add cmake configure dependency
|
||||
@@ -109,6 +128,7 @@
|
||||
#####################################################################
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/.stamp-generator-verified
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
${VIRTUALENV_PATH}
|
||||
diff --git a/src/tools/ifcodegen/verify_generator.py b/src/tools/ifcodegen/verify_generator.py
|
||||
new file mode 100755
|
||||
index 0000000..c3f85d6
|
||||
--- /dev/null
|
||||
+++ b/src/tools/ifcodegen/verify_generator.py
|
||||
@@ -0,0 +1,46 @@
|
||||
+#!/usr/bin/env python3
|
||||
+#############################################################################
|
||||
+##
|
||||
+## Copyright (C) 2022 The Qt Company Ltd.
|
||||
+## Contact: https://www.qt.io/licensing/
|
||||
+##
|
||||
+## This file is part of the QtInterfaceFramework module of the Qt Toolkit.
|
||||
+##
|
||||
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
||||
+## Commercial License Usage
|
||||
+## Licensees holding valid commercial Qt licenses may use this file in
|
||||
+## accordance with the commercial license agreement provided with the
|
||||
+## Software or, alternatively, in accordance with the terms contained in
|
||||
+## a written agreement between you and The Qt Company. For licensing terms
|
||||
+## and conditions see https://www.qt.io/terms-conditions. For further
|
||||
+## information use the contact form at https://www.qt.io/contact-us.
|
||||
+##
|
||||
+## GNU General Public License Usage
|
||||
+## Alternatively, this file may be used under the terms of the GNU
|
||||
+## General Public License version 3 as published by the Free Software
|
||||
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
+## included in the packaging of this file. Please review the following
|
||||
+## information to ensure the GNU General Public License requirements will
|
||||
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
+##
|
||||
+## $QT_END_LICENSE$
|
||||
+##
|
||||
+#############################################################################
|
||||
+
|
||||
+try:
|
||||
+ import generate
|
||||
+except Exception as e:
|
||||
+ raise SystemExit("""
|
||||
+ Verifying the generator failed!
|
||||
+
|
||||
+ This might be caused by a too recent python version or
|
||||
+ too recent python packages. You can try installing older
|
||||
+ python packages by running configure again with the the
|
||||
+ following option:
|
||||
+
|
||||
+ -DQT_USE_MINIMAL_QFACE_PACKAGES=TRUE
|
||||
+
|
||||
+ The python error was:
|
||||
+
|
||||
+ {}
|
||||
+ """.format(e))
|
@ -1,59 +1,8 @@
|
||||
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
|
||||
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
|
||||
|
||||
function(vcpkg_get_python_package PYTHON_DIR ) # From mesa
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _vgpp "" "PYTHON_EXECUTABLE" "PACKAGES")
|
||||
|
||||
if(NOT _vgpp_PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PYTHON_EXECUTABLE!")
|
||||
endif()
|
||||
if(NOT _vgpp_PACKAGES)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PACKAGES!")
|
||||
endif()
|
||||
if(NOT _vgpp_PYTHON_DIR)
|
||||
get_filename_component(_vgpp_PYTHON_DIR "${_vgpp_PYTHON_EXECUTABLE}" DIRECTORY)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(PYTHON_OPTION "")
|
||||
else()
|
||||
set(PYTHON_OPTION "--user")
|
||||
endif()
|
||||
|
||||
if("${_vgpp_PYTHON_DIR}" MATCHES "${DOWNLOADS}") # inside vcpkg
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
if(NOT EXISTS "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25
|
||||
SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a
|
||||
HEAD_REF master
|
||||
)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" ${PYTHON_OPTION})
|
||||
endif()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} ${PYTHON_OPTION})
|
||||
endforeach()
|
||||
else()
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package})
|
||||
endforeach()
|
||||
endif()
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
execute_process(COMMAND pip3 install ${_vgpp_PACKAGES})
|
||||
endif()
|
||||
else() # outside vcpkg
|
||||
foreach(_package IN LISTS _vgpp_PACKAGES)
|
||||
execute_process(COMMAND ${_vgpp_PYTHON_EXECUTABLE} -c "import ${_package}" RESULT_VARIABLE HAS_ERROR)
|
||||
if(HAS_ERROR)
|
||||
message(FATAL_ERROR "Python package '${_package}' needs to be installed for port '${PORT}'.\nComplete list of required python packages: ${_vgpp_PACKAGES}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set(${PORT}_PATCHES fix-taglib-search.patch) # Strictly this is only required if qt does not use pkg-config since it forces it to off.
|
||||
set(${PORT}_PATCHES fix-taglib-search.patch # Strictly this is only required if qt does not use pkg-config since it forces it to off.
|
||||
49b44d4.diff)
|
||||
set(TOOL_NAMES
|
||||
ifmedia-simulation-server
|
||||
ifvehiclefunctions-simulation-server
|
||||
@ -69,11 +18,11 @@ if(_qis_DISABLE_NINJA)
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY )
|
||||
vcpkg_add_to_path(PREPEND "${PYTHON3_DIR}")
|
||||
vcpkg_add_to_path(PREPEND "${PYTHON3_DIR}/Scripts")
|
||||
vcpkg_get_python_package(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES virtualenv qface)
|
||||
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "3"
|
||||
REQUIREMENTS_FILE "${CURRENT_PORT_DIR}/requirements_minimal.txt"
|
||||
PACKAGES qface==2.0.5
|
||||
OUT_PYTHON_VAR "PYTHON3")
|
||||
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
list(APPEND FEATURE_OPTIONS "-DVCPKG_HOST_TRIPLET=${_HOST_TRIPLET}")
|
||||
@ -84,6 +33,7 @@ set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml)
|
||||
qt_cmake_configure(${_opt}
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
"-DPython3_EXECUTABLE=${PYTHON3}" # Otherwise a VS installation might be found.
|
||||
"-DQT_USE_MINIMAL_QFACE_PACKAGES=TRUE"
|
||||
OPTIONS_DEBUG ${_qis_CONFIGURE_OPTIONS_DEBUG}
|
||||
OPTIONS_RELEASE ${_qis_CONFIGURE_OPTIONS_RELEASE})
|
||||
|
||||
|
14
ports/qtinterfaceframework/requirements_minimal.txt
Normal file
14
ports/qtinterfaceframework/requirements_minimal.txt
Normal file
@ -0,0 +1,14 @@
|
||||
antlr4-python3-runtime==4.7.1
|
||||
argh==0.26.2
|
||||
click==6.7
|
||||
coloredlogs==10.0
|
||||
humanfriendly==4.15.1
|
||||
Jinja2==2.10.3
|
||||
MarkupSafe==1.1
|
||||
path.py==11.0.1
|
||||
pathtools==0.1.2
|
||||
PyYAML==5.1
|
||||
six==1.11.0
|
||||
watchdog==2.1.7
|
||||
pytest==5.3.5
|
||||
pytest-cov==2.8.1
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "qtinterfaceframework",
|
||||
"version": "6.2.4",
|
||||
"port-version": 1,
|
||||
"description": "Qt Interface Framework",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
@ -30,6 +31,11 @@
|
||||
"name": "qttools",
|
||||
"default-features": false
|
||||
},
|
||||
"taglib"
|
||||
"taglib",
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"host": true,
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,6 +2,9 @@ file(COPY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/copyright"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/x_vcpkg_get_python_packages.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/python310._pth"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/x_vcpkg_get_python_packages.cmake")
|
||||
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
7
ports/vcpkg-get-python-packages/python310._pth
Normal file
7
ports/vcpkg-get-python-packages/python310._pth
Normal file
@ -0,0 +1,7 @@
|
||||
python310.zip
|
||||
Lib
|
||||
Lib/site-packages
|
||||
.
|
||||
|
||||
# Uncomment to run site.main() automatically
|
||||
#import site
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"version-date": "2022-02-12",
|
||||
"version-date": "2022-04-11",
|
||||
"license": "MIT",
|
||||
"supports": "native"
|
||||
}
|
||||
|
@ -7,64 +7,128 @@ Retrieve needed python packages
|
||||
## Usage
|
||||
```cmake
|
||||
x_vcpkg_get_python_packages(
|
||||
[PYTHON_VERSION (2|3)]
|
||||
PYTHON_EXECUTABLE <path to python binary>
|
||||
REQUIREMENTS_FILE <file-path>
|
||||
PACKAGES <packages to aqcuire>...
|
||||
[OUT_PYTHON_VAR somevar]
|
||||
)
|
||||
```
|
||||
## Parameters
|
||||
|
||||
### PYTHON_VERSION
|
||||
Python version to be used. Either 2 or 3
|
||||
|
||||
### PYTHON_EXECUTABLE
|
||||
Full path to the python executable
|
||||
|
||||
### REQUIREMENTS_FILE
|
||||
Requirement file with the list of python packages
|
||||
|
||||
### PACKAGES
|
||||
List of python packages to acquire
|
||||
|
||||
### OUT_PYTHON_VAR
|
||||
Variable to store the path to the python binary inside the virtual environment
|
||||
|
||||
|
||||
#]===]
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(x_vcpkg_get_python_packages)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg "" "PYTHON_EXECUTABLE" "PACKAGES")
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg "" "PYTHON_VERSION;PYTHON_EXECUTABLE;REQUIREMENTS_FILE;OUT_PYTHON_VAR" "PACKAGES")
|
||||
|
||||
if(NOT DEFINED arg_PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "PYTHON_EXECUTABLE must be specified.")
|
||||
if(DEFINED arg_PYTHON_VERSION AND NOT DEFINED arg_PYTHON_EXECUTABLE)
|
||||
vcpkg_find_acquire_program(PYTHON${arg_PYTHON_VERSION})
|
||||
set(arg_PYTHON_EXECUTABLE "${PYTHON${arg_PYTHON_VERSION}}")
|
||||
endif()
|
||||
if(NOT DEFINED arg_PACKAGES)
|
||||
message(FATAL_ERROR "PACKAGES must be specified.")
|
||||
|
||||
if(NOT DEFINED arg_PYTHON_EXECUTABLE AND NOT DEFINED arg_PYTHON_VERSION)
|
||||
message(FATAL_ERROR "PYTHON_EXECUTABLE or PYTHON_VERSION must be specified.")
|
||||
elseif(NOT DEFINED arg_PYTHON_VERSION)
|
||||
if(arg_PYTHON_EXECUTABLE MATCHES "(python3|python-3)")
|
||||
set(arg_PYTHON_VERSION 3)
|
||||
else()
|
||||
set(arg_PYTHON_VERSION 2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED arg_OUT_PYTHON_VAR)
|
||||
set(arg_OUT_PYTHON_VAR "PYTHON${arg_PYTHON_VERSION}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED arg_PACKAGES AND NOT DEFINED arg_REQUIREMENTS_FILE)
|
||||
message(FATAL_ERROR "PACKAGES or REQUIREMENTS_FILE must be specified.")
|
||||
endif()
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
get_filename_component(python_dir "${arg_PYTHON_EXECUTABLE}" DIRECTORY)
|
||||
|
||||
set(ENV{PYTHONNOUSERSITE} "1")
|
||||
if("${python_dir}" MATCHES "(${DOWNLOADS}|${CURRENT_HOST_INSTALLED_DIR})" AND CMAKE_HOST_WIN32) # inside vcpkg and windows host.
|
||||
#if(NOT EXISTS "${python_dir}/python310._pth" AND PYTHON_EXECUTABLE MATCHES "python3")
|
||||
# file(COPY "${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-get-python-packages/python310._pth" DESTINATION "${python_dir}")
|
||||
#endif()
|
||||
if(NOT EXISTS "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
if(NOT EXISTS "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25
|
||||
SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a
|
||||
REF 38e54e5de07c66e875c11a1ebbdb938854625dd8 #2022-03-07
|
||||
SHA512 431a9f66618a2f251db3a8c3311e7fc3af3ff7364ec1d14a99f1b9c237646b6146cef8b9471d83e1086dba2ed448bccc48d99b2bb375e4235d78e76d9970d3e5
|
||||
)
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py"
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}")
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/public/get-pip.py" --no-warn-script-location
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "get-pip-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
foreach(_package IN LISTS arg_PACKAGES)
|
||||
vcpkg_execute_required_process(COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}")
|
||||
endforeach()
|
||||
vcpkg_execute_required_process(COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install virtualenv --no-warn-script-location
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-virtualenv-${TARGET_TRIPLET}")
|
||||
else()
|
||||
foreach(_package IN LISTS arg_PACKAGES)
|
||||
vcpkg_execute_required_process(COMMAND "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}")
|
||||
endforeach()
|
||||
vcpkg_execute_required_process(COMMAND "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" virtualenv --no-warn-script-location #${_package}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "easy-install-virtualenv-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
else() # outside vcpkg
|
||||
foreach(package IN LISTS arg_PACKAGES)
|
||||
vcpkg_execute_in_download_mode(COMMAND ${arg_PYTHON_EXECUTABLE} -c "import ${package}" RESULT_VARIABLE HAS_ERROR)
|
||||
if(HAS_ERROR)
|
||||
message(FATAL_ERROR "Python package '${package}' needs to be installed for port '${PORT}'.\nComplete list of required python packages: ${arg_PACKAGES}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
set(venv_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-venv")
|
||||
file(REMOVE_RECURSE "${venv_path}") # Remove old venv
|
||||
file(MAKE_DIRECTORY "${venv_path}")
|
||||
if(CMAKE_HOST_WIN32)
|
||||
file(MAKE_DIRECTORY "${python_dir}/DLLs")
|
||||
set(python_sub_path /Scripts)
|
||||
set(python_venv virtualenv)
|
||||
file(COPY "${python_dir}/python310.zip" DESTINATION "${venv_path}/Scripts")
|
||||
set(python_venv_options "--app-data" "${venv_path}/data")
|
||||
else()
|
||||
set(python_sub_path /bin)
|
||||
set(python_venv venv)
|
||||
set(python_venv_options --symlinks)
|
||||
endif()
|
||||
|
||||
set(ENV{PYTHONNOUSERSITE} "1")
|
||||
message(STATUS "Setting up python virtual environmnent...")
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -m "${python_venv}" ${python_venv_options} "${venv_path}"
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "venv-setup-${TARGET_TRIPLET}")
|
||||
vcpkg_add_to_path(PREPEND "${venv_path}${python_sub_path}")
|
||||
set(${arg_OUT_PYTHON_VAR} "${venv_path}${python_sub_path}/python${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
set(ENV{VIRTUAL_ENV} "${venv_path}")
|
||||
unset(ENV{PYTHONHOME})
|
||||
unset(ENV{PYTHONPATH})
|
||||
if(DEFINED arg_REQUIREMENTS_FILE)
|
||||
message(STATUS "Installing requirements from: ${arg_REQUIREMENTS_FILE}")
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install -r ${arg_REQUIREMENTS_FILE}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-requirements-file-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
if(DEFINED arg_PACKAGES)
|
||||
message(STATUS "Installing python packages: ${arg_PACKAGES}")
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install ${arg_PACKAGES}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-packages-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
message(STATUS "Setting up python virtual environmnent...finished.")
|
||||
set(${arg_OUT_PYTHON_VAR} "${PYTHON${arg_PYTHON_VERSION}}" PARENT_SCOPE)
|
||||
set(${arg_OUT_PYTHON_VAR} "${PYTHON${arg_PYTHON_VERSION}}" CACHE PATH "" FORCE)
|
||||
endfunction()
|
||||
|
@ -1011,9 +1011,6 @@ qt5-base:arm64-windows=fail
|
||||
# qtwebengine:x64-windows has an ICE in VS2022
|
||||
qtwebengine:x64-windows=fail
|
||||
|
||||
# upstream bug, see https://github.com/microsoft/vcpkg/issues/23766
|
||||
qtinterfaceframework:x64-windows=skip
|
||||
|
||||
# Skip deprecated Qt module
|
||||
# (remove after 1 year or longer due to vcpkg upgrade not handling removed ports correctly)
|
||||
qt5-canvas3d:x64-linux=skip
|
||||
|
@ -3669,8 +3669,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"libilbc": {
|
||||
"baseline": "3.0.3",
|
||||
"port-version": 1
|
||||
"baseline": "3.0.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libimobiledevice": {
|
||||
"baseline": "1.3.17",
|
||||
@ -4454,7 +4454,7 @@
|
||||
},
|
||||
"mesa": {
|
||||
"baseline": "21.2.5",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"meschach": {
|
||||
"baseline": "1.2b",
|
||||
@ -5086,15 +5086,15 @@
|
||||
},
|
||||
"opencv2": {
|
||||
"baseline": "2.4.13.7",
|
||||
"port-version": 11
|
||||
"port-version": 12
|
||||
},
|
||||
"opencv3": {
|
||||
"baseline": "3.4.16",
|
||||
"port-version": 6
|
||||
"port-version": 7
|
||||
},
|
||||
"opencv4": {
|
||||
"baseline": "4.5.5",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"opendnp3": {
|
||||
"baseline": "3.1.1",
|
||||
@ -5890,7 +5890,7 @@
|
||||
},
|
||||
"qtinterfaceframework": {
|
||||
"baseline": "6.2.4",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"qtkeychain": {
|
||||
"baseline": "0.13.2",
|
||||
@ -7305,7 +7305,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-get-python-packages": {
|
||||
"baseline": "2022-02-12",
|
||||
"baseline": "2022-04-11",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-gfortran": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f12ae842a06b6f2d77a889d6279dc997bbd61d0b",
|
||||
"version": "3.0.4",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "2c86ad893279ccf359e6ee1b22ff5e2e3a935a42",
|
||||
"version-string": "3.0.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "32925250dd7d2e060ca2cfe9fbda1d3f4312f29a",
|
||||
"version": "21.2.5",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "aa75375f1cc9c3c4697c8fa8df4e647fb60f0125",
|
||||
"version": "21.2.5",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "65f3aff976c42b2759e70867fa006287ff1be835",
|
||||
"version": "2.4.13.7",
|
||||
"port-version": 12
|
||||
},
|
||||
{
|
||||
"git-tree": "d90ae2125e2fa18011bd9defe7a651d110113b76",
|
||||
"version": "2.4.13.7",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d3c28cb4da2e7da9d31cc72415aff26f0b4d8442",
|
||||
"version": "3.4.16",
|
||||
"port-version": 7
|
||||
},
|
||||
{
|
||||
"git-tree": "65bade77414d264741d23ce93401c1bc08718e86",
|
||||
"version": "3.4.16",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0771f6243ddde63a9b212efeb5ad51a74b640a62",
|
||||
"version": "4.5.5",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "90f4418431aa3ddcdbd34c33d5e654cda5cda26a",
|
||||
"version": "4.5.5",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e4969db9a78db8b04d4d803e4494a9f98007396a",
|
||||
"version": "6.2.4",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "e36f5d74c2e94aa38c74b0fdfec8778fb7851523",
|
||||
"version": "6.2.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f03d459d365b604decb720f7da79b3f7d7127670",
|
||||
"version-date": "2022-04-11",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "e429a4c957711115ea1b795327843acb05fc8b29",
|
||||
"version-date": "2022-02-12",
|
||||
|
Loading…
Reference in New Issue
Block a user