-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
97 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) | ||
set(VCPKG_BUILD_TYPE release) | ||
|
||
vcpkg_download_distfile( | ||
ARCHIVE | ||
URLS https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-6.8.0.dev2411221125.tar.gz | ||
FILENAME pyqt6.tar.gz | ||
SHA512 f52fe48969a8b86651f6a3bf6156a91c57e42e4192bd184dfe6b7ac8a4728509b4610c2da8fb88039ff2880b02c6dbb455d1ed12fb65b7cd65ddb8ca7fb6a476 | ||
) | ||
|
||
vcpkg_extract_source_archive_ex( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
ARCHIVE ${ARCHIVE} | ||
) | ||
|
||
# https://www.riverbankcomputing.com/static/Docs/PyQt6/installation.html | ||
set(SIPBUILD_ARGS | ||
"--confirm-license" | ||
"--qmake" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/qmake${VCPKG_HOST_EXECUTABLE_SUFFIX}" | ||
"--api-dir" "${CURRENT_PACKAGES_DIR}/share/Qt6/qsci/api/python" | ||
"--verbose" | ||
"--qt-shared" | ||
"--no-make" | ||
"--disable" "QtDesigner" | ||
"--pep484-pyi" | ||
"--build-dir" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" | ||
"--target-dir" "${PYTHON3_SITEPACKAGES}" | ||
) | ||
|
||
if(VCPKG_TARGET_IS_OSX) | ||
if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) | ||
vcpkg_list(APPEND SIPBUILD_ARGS "--qmake-setting" "QMAKE_MACOSX_DEPLOYMENT_TARGET=${VCPKG_OSX_DEPLOYMENT_TARGET}") | ||
else() | ||
# https://doc.qt.io/qt-6/macos.html | ||
vcpkg_list(APPEND SIPBUILD_ARGS "--qmake-setting" "QMAKE_MACOSX_DEPLOYMENT_TARGET=10.15") | ||
endif() | ||
vcpkg_list(APPEND SIPBUILD_ARGS "--no-dbus-python") | ||
endif() | ||
|
||
|
||
vcpkg_backup_env_variables(VARS PATH) | ||
|
||
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/Scripts/" "${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/" "${CURRENT_HOST_INSTALLED_DIR}/bin") | ||
|
||
message(STATUS "Running sipbuild...") | ||
vcpkg_execute_required_process( | ||
COMMAND "${PYTHON3}" "-m" "sipbuild.tools.build" ${SIPBUILD_ARGS} | ||
WORKING_DIRECTORY "${SOURCE_PATH}" | ||
LOGNAME "sipbuild-${TARGET_TRIPLET}" | ||
) | ||
message(STATUS "Running sipbuild...finished.") | ||
|
||
# inventory.txt is consumed by the distinfo tool which is run during make and should be run against the package directory | ||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) | ||
vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/inventory.txt" | ||
"${CURRENT_INSTALLED_DIR}" | ||
"${CURRENT_PACKAGES_DIR}") | ||
vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/inventory.txt" | ||
"${NATIVE_INSTALLED_DIR}" | ||
"${CURRENT_PACKAGES_DIR}") | ||
|
||
vcpkg_qmake_build(BUILD_LOGNAME "install" TARGETS "install") | ||
|
||
vcpkg_restore_env_variables(VARS PATH) | ||
|
||
vcpkg_python_test_import(MODULE "PyQt6.QtCore") |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "py-pyqt6", | ||
"version": "6.8.0", | ||
"description": "Python bindings for the Qt cross platform application toolkit", | ||
"homepage": "https://www.riverbankcomputing.com/software/pyqt/", | ||
"dependencies": [ | ||
"py-packaging", | ||
"py-ply", | ||
"py-pyqt-builder", | ||
"py-pyqt6-sip", | ||
"python3", | ||
{ | ||
"name": "qtactiveqt", | ||
"platform": "windows" | ||
}, | ||
"qtbase", | ||
"qtmultimedia", | ||
"qtsensors", | ||
"qtsvg", | ||
"qtwebchannel", | ||
"qtwebsockets", | ||
{ | ||
"name": "vcpkg-python-scripts", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-qmake", | ||
"host": true | ||
} | ||
] | ||
} |