[python3] no absolute paths (#21144)

This commit is contained in:
autoantwort 2021-11-09 20:45:15 +01:00 committed by GitHub
parent b50c57fca2
commit d9b47f3626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 1 deletions

View File

@ -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()

View File

@ -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)",

View File

@ -5414,7 +5414,7 @@
},
"python3": {
"baseline": "3.10.0",
"port-version": 0
"port-version": 1
},
"qca": {
"baseline": "2.3.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b155976e5a0266f5f73e2ff642b5281303a6a73f",
"version-semver": "3.10.0",
"port-version": 1
},
{
"git-tree": "08e4258968ff551133ae315eb8ed207f87f085b6",
"version-semver": "3.10.0",