Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ports/py-annotated-types/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-annotated-types",
"version": "0.8.0",
"port-version": 1,
"description": "Reusable constraints for Python types, using PEP 593 Annotated",
"homepage": "https://github.com/pydantic/annotated-types",
"license": null,
Expand All @@ -13,6 +14,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-certifi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-certifi",
"version-date": "2026-10-23",
"port-version": 1,
"description": "A carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts.",
"homepage": "https://github.com/certifi/python-certifi",
"license": null,
Expand All @@ -10,6 +11,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
3 changes: 2 additions & 1 deletion ports/py-cppy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "py-cppy",
"version": "1.2.1",
"port-version": 1,
"port-version": 2,
"description": "A collection of C++ headers which make it easier to write Python C extension modules",
"homepage": "https://cppy.readthedocs.io/en/latest/",
"license": "BSD-3-Clause",
Expand All @@ -10,6 +10,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-kiwisolver/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-kiwisolver",
"version": "1.5.1",
"port-version": 1,
"description": "Efficient C++ implementation of the Cassowary constraint solving algorithm",
"homepage": "https://kiwisolver.readthedocs.io/en/latest/",
"license": null,
Expand All @@ -10,6 +11,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-packaging/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "py-packaging",
"version": "26.3",
"port-version": 1,
"description": "Core utilities for Python packages",
"homepage": "https://packaging.pypa.io/",
"license": "MIT",
"dependencies": [
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-pillow/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-pillow",
"version": "13.0.0",
"port-version": 1,
"description": "Python Imaging Library",
"homepage": "https://python-pillow.org/",
"license": null,
Expand Down Expand Up @@ -28,6 +29,7 @@
"name": "pybind11",
"host": true
},
"python3",
"tiff",
{
"name": "vcpkg-python-scripts",
Expand Down
2 changes: 2 additions & 0 deletions ports/py-pyproject-metadata/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-pyproject-metadata",
"version": "0.12.1",
"port-version": 1,
"description": "PEP 621 metadata parsing",
"homepage": "https://pep621.readthedocs.io/",
"license": "MIT",
Expand All @@ -9,6 +10,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
3 changes: 2 additions & 1 deletion ports/py-pyqt6-webengine/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}")

# https://www.riverbankcomputing.com/static/Docs/PyQt6/installation.html
vcpkg_python_get_qmake(QMAKE)
set(SIPBUILD_ARGS
"--qmake" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/qmake${VCPKG_HOST_EXECUTABLE_SUFFIX}"
"--qmake" "${QMAKE}"
"--api-dir" "${CURRENT_PACKAGES_DIR}/share/Qt6/qsci/api/python"
"--verbose"
"--no-make"
Expand Down
1 change: 1 addition & 0 deletions ports/py-pyqt6-webengine/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-pyqt6-webengine",
"version": "6.11.0",
"port-version": 1,
"description": "Python bindings for the Qt WebEngine framework",
"homepage": "https://www.riverbankcomputing.com/software/pyqtwebengine/",
"license": "GPL-3.0-only",
Expand Down
3 changes: 2 additions & 1 deletion ports/py-pyqt6/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ vcpkg_from_pythonhosted(
)

# https://www.riverbankcomputing.com/static/Docs/PyQt6/installation.html
vcpkg_python_get_qmake(QMAKE)
set(SIPBUILD_ARGS
"--confirm-license"
"--qmake" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/qmake${VCPKG_HOST_EXECUTABLE_SUFFIX}"
"--qmake" "${QMAKE}"
"--api-dir" "${CURRENT_PACKAGES_DIR}/share/Qt6/qsci/api/python"
"--verbose"
"--qt-shared"
Expand Down
1 change: 1 addition & 0 deletions ports/py-pyqt6/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-pyqt6",
"version": "6.12.0",
"port-version": 1,
"description": "Python bindings for the Qt cross platform application toolkit",
"homepage": "https://www.riverbankcomputing.com/software/pyqt/",
"dependencies": [
Expand Down
3 changes: 2 additions & 1 deletion ports/py-qscintilla/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ vcpkg_extract_source_archive(

file(RENAME "${SOURCE_PATH}/Python/pyproject-qt5.toml" "${SOURCE_PATH}/Python/pyproject.toml")

vcpkg_python_get_qmake(QMAKE)
set(SIPBUILD_ARGS
"--qmake" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/qmake${VCPKG_HOST_EXECUTABLE_SUFFIX}"
"--qmake" "${QMAKE}"
"--api-dir" "${CURRENT_PACKAGES_DIR}/share/Qt6/qsci/api/python"
"--qsci-features-dir" "${SOURCE_PATH}/src/features"
"--qsci-include-dir" "${CURRENT_INSTALLED_DIR}/${PYTHON3_SITE}/PyQt6/bindings"
Expand Down
2 changes: 1 addition & 1 deletion ports/py-qscintilla/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "py-qscintilla",
"version": "2.14.1",
"port-version": 2,
"port-version": 3,
"description": "Python bindings for QScintilla, which is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin)",
"homepage": "https://www.riverbankcomputing.com/software/qscintilla",
"license": "GPL-3.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions ports/py-scikit-build-core/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-scikit-build-core",
"version": "1.1.2",
"port-version": 1,
"description": "A next generation Python CMake adaptor and Python API for plugins",
"homepage": "https://scikit-build-core.readthedocs.io/",
"license": "Apache-2.0",
Expand All @@ -21,6 +22,7 @@
"name": "py-setuptools-scm",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
3 changes: 2 additions & 1 deletion ports/py-semantic-version/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "py-semantic-version",
"version": "2.10.0",
"port-version": 1,
"port-version": 2,
"description": "About Semantic version comparison for Python (see http://semver.org/)",
"homepage": "https://python-markdown.github.io/",
"license": "BSD-2-Clause",
Expand All @@ -10,6 +10,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
3 changes: 2 additions & 1 deletion ports/py-setuptools-scm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "py-setuptools-scm",
"version": "9.2.2",
"port-version": 3,
"port-version": 4,
"description": "the blessed package to manage your versions by scm tags",
"homepage": "https://github.com/pypa/setuptools_scm",
"license": "MIT",
Expand All @@ -14,6 +14,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-get-python-packages",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-sip/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "py-sip",
"version": "6.17.2",
"port-version": 1,
"description": "A tool that makes it easy to create Python bindings for C and C++ libraries",
"homepage": "https://www.riverbankcomputing.com/software/sip",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
3 changes: 2 additions & 1 deletion ports/py-six/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "py-six",
"version": "1.17.0",
"port-version": 1,
"port-version": 2,
"description": "Python 2 and 3 compatibility library ",
"homepage": "https://github.com/benjaminp/six",
"license": null,
Expand All @@ -10,6 +10,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
3 changes: 2 additions & 1 deletion ports/py-tomli/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "py-tomli",
"version": "2.0.1",
"port-version": 2,
"port-version": 3,
"description": "A simple, correct Python build frontend ",
"homepage": "https://github.com/hukkin/tomli",
"license": "MIT",
"dependencies": [
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-typing-extensions/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-typing-extensions",
"version": "4.16.0",
"port-version": 1,
"description": "Backported and experimental type hints for Python",
"homepage": "https://github.com/python/typing_extensions",
"license": null,
Expand All @@ -9,6 +10,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-typing-inspection/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-typing-inspection",
"version": "0.4.3",
"port-version": 1,
"description": "Runtime typing introspection tools",
"homepage": "https://github.com/pydantic/typing-inspection",
"license": null,
Expand All @@ -9,6 +10,7 @@
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
2 changes: 2 additions & 0 deletions ports/py-wheel/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "py-wheel",
"version": "0.48.0",
"port-version": 1,
"description": "The official binary distribution format for Python",
"homepage": "https://github.com/pypa/wheel",
"license": "MIT",
"dependencies": [
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
Expand Down
13 changes: 12 additions & 1 deletion ports/python3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ else()
)
if(VCPKG_TARGET_IS_OSX)
list(APPEND OPTIONS "LIBS=-liconv -lintl")
# pipe2() is declared by the macOS 27 SDK but missing on older macOS; CPython 3.12 calls it unguarded,
# so os.pipe() (and subprocess) crashes with a NULL call when built with a newer SDK than the running OS.
list(APPEND OPTIONS "ac_cv_func_pipe2=no")
endif()

if("readline" IN_LIST FEATURES)
Expand All @@ -276,7 +279,15 @@ else()

# The version of the build Python must match the version of the cross compiled host Python.
# https://docs.python.org/3/using/configure.html#cross-compiling-options
if(VCPKG_CROSSCOMPILING)
if(VCPKG_CROSSCOMPILING AND VCPKG_TARGET_IS_OSX AND CMAKE_HOST_APPLE)
# macOS arm64 <-> x86_64: CPython's configure rejects "--host=x86_64-apple-darwin --build=aarch64-apple-darwin"
# ("cross build not supported"), but the target binaries run natively (Rosetta), so configure as a native build.
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(VCPKG_MAKE_BUILD_TRIPLET "--host=x86_64-apple-darwin" "--build=x86_64-apple-darwin")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-apple-darwin" "--build=aarch64-apple-darwin")
endif()
elseif(VCPKG_CROSSCOMPILING)
set(_python_for_build "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
list(APPEND OPTIONS "--with-build-python=${_python_for_build}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion ports/python3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "python3",
"version": "3.12.11",
"port-version": 2,
"port-version": 3,
"description": "The Python programming language",
"homepage": "https://github.com/python/cpython",
"license": "Python-2.0",
Expand Down
7 changes: 7 additions & 0 deletions ports/vcpkg-python-scripts/vcpkg-port-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ set(PYTHON3_BASEDIR "${CURRENT_INSTALLED_DIR}/tools/python3")
find_program(PYTHON3 NAMES python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} python${PYTHON3_VERSION_MAJOR} python PATHS "${PYTHON3_BASEDIR}" NO_DEFAULT_PATH)
set(PYTHON3_SITEPACKAGES "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}")

if(VCPKG_CROSSCOMPILING AND NOT CURRENT_HOST_INSTALLED_DIR STREQUAL CURRENT_INSTALLED_DIR)
# The build tools (gpep517, installer, setuptools, wheel, ...) are host dependencies, but PYTHON3 is the
# target interpreter. They are pure Python, so let the target interpreter import them from the host tree.
# Only works if the target interpreter can run on the build machine (e.g. x64 under Rosetta).
vcpkg_host_path_list(APPEND ENV{PYTHONPATH} "${CURRENT_HOST_INSTALLED_DIR}/${PYTHON3_SITE}")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_python_functions.cmake")
2 changes: 1 addition & 1 deletion ports/vcpkg-python-scripts/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vcpkg-python-scripts",
"version-date": "2025-05-20",
"port-version": 2,
"port-version": 3,
"documentation": "https://vcpkg.io/en/docs/README.html",
"license": "MIT",
"supports": "native",
Expand Down
22 changes: 22 additions & 0 deletions ports/vcpkg-python-scripts/vcpkg_python_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ function(vcpkg_from_pythonhosted)
set("${arg_OUT_SOURCE_PATH}" "${SOURCE_PATH}" PARENT_SCOPE)
endfunction()

# Returns the qmake to pass to sipbuild (--qmake). Normally that is the installed target qmake. When cross-compiling
# the target qmake is not installed (Qt's qmake/moc/... come from the host tree), so generate a wrapper which runs the
# host qmake against the target Qt, the same way vcpkg_qmake_configure does (-qtconf).
function(vcpkg_python_get_qmake out_var)
set(target_qmake "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/qmake${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
if(EXISTS "${target_qmake}")
set("${out_var}" "${target_qmake}" PARENT_SCOPE)
return()
endif()
set(host_qmake "${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/qmake${VCPKG_HOST_EXECUTABLE_SUFFIX}")
set(qt_conf_template "${CURRENT_INSTALLED_DIR}/tools/Qt6/qt_release.conf")
if(NOT VCPKG_CROSSCOMPILING OR NOT EXISTS "${host_qmake}" OR NOT EXISTS "${qt_conf_template}" OR CMAKE_HOST_WIN32)
message(FATAL_ERROR "No usable qmake: '${target_qmake}' is missing and a host qmake wrapper cannot be generated.")
endif()
set(wrapper_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-qmake")
file(MAKE_DIRECTORY "${wrapper_dir}")
configure_file("${qt_conf_template}" "${wrapper_dir}/qt.conf")
file(WRITE "${wrapper_dir}/qmake" "#!/bin/sh\nexec \"${host_qmake}\" -qtconf \"${wrapper_dir}/qt.conf\" \"$@\"\n")
file(CHMOD "${wrapper_dir}/qmake" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
set("${out_var}" "${wrapper_dir}/qmake" PARENT_SCOPE)
endfunction()

function(vcpkg_python_build_wheel)
cmake_parse_arguments(
PARSE_ARGV 0
Expand Down
Loading
Loading