Skip to content

Commit

Permalink
Merge pull request #969 from Hoikas/vcpkg-upgrade
Browse files Browse the repository at this point in the history
Update vcpkg submodule.
  • Loading branch information
Hoikas committed Jul 22, 2021
2 parents 71b0fd1 + 1e2a575 commit e28658b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Scripts/Ports/python3-cairosvg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(NOT VCPKG_TARGET_IS_WINDOWS)
message(STATUS "Install cairo on Ubuntu with `sudo apt install libcairo2` and on macOS with `brew install cairo`.")
endif()

set(CAIROSVG_VERSION "2.5.1")
set(CAIROSVG_VERSION "2.5.2")
set(INSTALLED_PYTHON_PREFIX "${CURRENT_INSTALLED_DIR}/tools/python3")

# We are running in script mode, so no toolchains are available. Sad.
Expand All @@ -24,13 +24,13 @@ endif()
# this should be the tools/python3 directory. In other cases, it should be CURRENT_INSTALLED_DIR.
vcpkg_execute_in_download_mode(
COMMAND "${PYTHON_EXECUTABLE}" -c "import sys;sys.stdout.write(sys.exec_prefix)"
WORKING_DIRECTORY "${INSTALLED_PYTHON_PREFIX}"
OUTPUT_VARIABLE INSTALLED_PYTHON_PREFIX
LOGNAME query-prefix
)
vcpkg_execute_in_download_mode(
COMMAND "${PYTHON_EXECUTABLE}" -c "import sys,distutils.sysconfig;sys.stdout.write(distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False))"
WORKING_DIRECTORY "${INSTALLED_PYTHON_PREFIX}"
OUTPUT_VARIABLE INSTALLED_SITE_PACKAGES_DIR
LOGNAME query-site-packages
)

# The returned values from above are absolute paths into the installed tree. However, we cannot
Expand Down Expand Up @@ -116,13 +116,16 @@ message(STATUS "Installing cairosvg from pip")
file(TO_NATIVE_PATH "${CURRENT_PYTHON_PREFIX}" _PIP_PREFIX)
vcpkg_execute_required_process(
COMMAND "${PYTHON_EXECUTABLE}" -m pip install --prefix "${_PIP_PREFIX}" "cairosvg==${CAIROSVG_VERSION}"
ALLOW_IN_DOWNLOAD_MODE
WORKING_DIRECTORY "${CURRENT_PYTHON_PREFIX}"
LOGNAME install
)
# Perform a sample import of cairosvg to ensure all this weird hacking actually works.
message(STATUS "Testing cairosvg")
set(ENV{PYTHONPATH} "${CURRENT_SITE_PACKAGES_DIR}")
vcpkg_execute_required_process(
COMMAND "${PYTHON_EXECUTABLE}" -c "import cairosvg"
ALLOW_IN_DOWNLOAD_MODE
WORKING_DIRECTORY "${CURRENT_PYTHON_PREFIX}"
LOGNAME test
)
2 changes: 1 addition & 1 deletion Scripts/Ports/python3-cairosvg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "python3-cairosvg",
"version-string": "2.5.1",
"version-semver": "2.5.2",
"description": "CairoSVG is an SVG converter based on Cairo. It can export SVG files to PDF, EPS, PS, and PNG files.",
"homepage": "https://cairosvg.org/",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 1793 files

0 comments on commit e28658b

Please sign in to comment.