diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index b57de25bbbf065..74ceb801ea4038 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -194,6 +194,8 @@ else() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") + + vcpkg_fixup_pkgconfig() endif() file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") @@ -211,3 +213,19 @@ message(STATUS "Installing cmake wrappers") _generate_finder(DIRECTORY "python" PREFIX "Python") _generate_finder(DIRECTORY "python3" PREFIX "Python3") _generate_finder(DIRECTORY "pythoninterp" PREFIX "PYTHON" NO_OVERRIDE) + +if (NOT VCPKG_TARGET_IS_WINDOWS) + file(GLOB python_config_files "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/_sysconfigdata*") + list(POP_FRONT python_config_files python_config_file) + vcpkg_replace_string("${python_config_file}" "# system configuration generated and used by the sysconfig module" "# system configuration generated and used by the sysconfig module\nimport os\n_base = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))\n") + vcpkg_replace_string("${python_config_file}" "${CURRENT_INSTALLED_DIR}" "' + _base + '") + vcpkg_replace_string("${python_config_file}" "${CURRENT_PACKAGES_DIR}" "' + _base + '") + vcpkg_replace_string("${python_config_file}" "${CURRENT_BUILDTREES_DIR}" "not/existing") + + file(GLOB python_config_files "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/_sysconfigdata*") + list(POP_FRONT python_config_files python_config_file) + vcpkg_replace_string("${python_config_file}" "# system configuration generated and used by the sysconfig module" "# system configuration generated and used by the sysconfig module\nimport os\n_base = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))\n") + vcpkg_replace_string("${python_config_file}" "${CURRENT_INSTALLED_DIR}" "' + _base + '") + vcpkg_replace_string("${python_config_file}" "${CURRENT_PACKAGES_DIR}" "' + _base + '") + vcpkg_replace_string("${python_config_file}" "${CURRENT_BUILDTREES_DIR}" "not/existing") +endif() diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index 22ec71666224cd..358fcac48e2f43 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,6 +1,7 @@ { "name": "python3", "version-semver": "3.10.0", + "port-version": 1, "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "supports": "!(arm | uwp)", diff --git a/versions/baseline.json b/versions/baseline.json index 029eb935b9ed07..b937a9de80ee16 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5398,7 +5398,7 @@ }, "python3": { "baseline": "3.10.0", - "port-version": 0 + "port-version": 1 }, "qca": { "baseline": "2.3.1", diff --git a/versions/p-/python3.json b/versions/p-/python3.json index 007cb9431c05af..1e408989bb001c 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b155976e5a0266f5f73e2ff642b5281303a6a73f", + "version-semver": "3.10.0", + "port-version": 1 + }, { "git-tree": "08e4258968ff551133ae315eb8ed207f87f085b6", "version-semver": "3.10.0",