Skip to content

Commit

Permalink
New ports urllib3 and markupsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 9, 2024
1 parent 4c88569 commit 874cc76
Show file tree
Hide file tree
Showing 31 changed files with 431 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
./vcpkg/vcpkg install $VCPKG_OPTIONS py-sip
./vcpkg/vcpkg install $VCPKG_OPTIONS py-numpy
./vcpkg/vcpkg install $VCPKG_OPTIONS py-psycopg2
./vcpkg/vcpkg install $VCPKG_OPTIONS py-urllib3
./vcpkg/vcpkg install $VCPKG_OPTIONS py-markupsafe
# ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pyqt6
- name: 📑 Upload logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: 🌋 Build
run: |
.\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 py-pyyaml py-numpy gdal[python] py-qscintilla py-psycopg2
.\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 py-pyyaml py-numpy gdal[python] py-qscintilla py-psycopg2 py-urllib3 py-markupsafe
- name: 📑 Upload logs
uses: actions/upload-artifact@v4
Expand Down
16 changes: 16 additions & 0 deletions ports/py-hatch-vcs/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME hatch_vcs
VERSION ${VERSION}
SHA512 8689d3939b384b66c8153b88e82c55c4ec59a971dae6138c8d70995d332d62c870d611f0be5d2e47640f6c80cb55d1d8e556d6b3f0085f94dd505aaf7fdb93bd
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

vcpkg_python_test_import(MODULE "hatch_vcs")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-hatch-vcs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-hatch-vcs",
"version": "0.4.0",
"description": "Hatch plugin for versioning with your preferred VCS",
"homepage": "https://github.com/ofek/hatch-vcs",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-hatchling/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME hatchling
VERSION ${VERSION}
SHA512 fc1580225700695258dfad35e4c3cf86d210ebe196b52760afa49fb95ffaccb90742ded67dcd3a2c50cdb7672dfdb1701c6bb2c0c57957f9c62184a3c8c7d00c
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

vcpkg_python_test_import(MODULE "hatchling")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
20 changes: 20 additions & 0 deletions ports/py-hatchling/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "py-hatchling",
"version": "1.25.0",
"description": "Modern, extensible Python build backend",
"homepage": "https://hatch.pypa.io/latest/",
"dependencies": [
"py-pathspec",
"py-pluggy",
{
"name": "py-setuptools",
"host": true
},
"py-trove-classifiers",
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-markupsafe/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME markupsafe
VERSION ${VERSION}
SHA512 1d5342766fae024a243e12a2ad384724ec2a9ea5dfd4af1651725ef5201bcec5ca2e520720a05d05d3ca91fcdbf78e00afec6a70a73146ab29e29c6989559651
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

vcpkg_python_test_import(MODULE "markupsafe")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-markupsafe/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-markupsafe",
"version": "3.0.1",
"description": "Safely add untrusted strings to HTML/XML markup.",
"homepage": "https://markupsafe.palletsprojects.com/",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-pathspec/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME pathspec
VERSION ${VERSION}
SHA512 19d1a8ae5936e76eacd691b0e2fb33d0de376556751a9ae007f6b09d0aa36af7d171101df620cab3e93c9913be578ff3d6bba9d4460351ac248e5c9e015380ad
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

vcpkg_python_test_import(MODULE "pathspec")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-pathspec/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-pathspec",
"version": "0.12.1",
"description": "Utility library for gitignore style pattern matching of file paths.",
"homepage": "https://python-path-specification.readthedocs.io/en/latest/index.html",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-pluggy/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME pluggy
VERSION ${VERSION}
SHA512 032d41e1f2bed56eff22463c4645516e9415ee253e0a3fe5ba83a8de5e21700baae1f6384c979d2c6f622e4216a2b745eec489bc04f52a576d423e771365cc7a
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

vcpkg_python_test_import(MODULE "pluggy")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-pluggy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-pluggy",
"version": "1.5.0",
"description": "plugin and hook calling mechanisms for python",
"homepage": "https://github.com/pytest-dev/pluggy",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
6 changes: 5 additions & 1 deletion ports/py-setuptools-scm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ vcpkg_find_acquire_program(GIT)
cmake_path(GET GIT PARENT_PATH GIT_DIR)
vcpkg_add_to_path("${GIT_DIR}")

vcpkg_get_mecurial(HG)
if(VCPKG_HOST_IS_WINDOWS)
vcpkg_get_mercurial(HG)
else()
find_program(HG NAMES hg)
endif()
cmake_path(GET HG PARENT_PATH HG_DIR)
vcpkg_add_to_path("${HG_DIR}")

Expand Down
6 changes: 5 additions & 1 deletion ports/py-setuptools-scm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-setuptools-scm",
"version": "8.1.0",
"port-version": 1,
"description": "the blessed package to manage your versions by scm tags",
"homepage": "https://github.com/pypa/setuptools_scm",
"license": "MIT",
Expand All @@ -17,6 +18,9 @@
"py-typing-extensions",
"vcpkg-get-python-packages",
"vcpkg-python-scripts",
"vcpkg-tool-mecurial"
{
"name": "vcpkg-tool-mercurial",
"platform": "windows"
}
]
}
16 changes: 16 additions & 0 deletions ports/py-trove-classifiers/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME trove_classifiers
VERSION ${VERSION}
SHA512 4fc6efc514638dfb2aee4fbd06f258bb9d5d9d54269e6d33f3739a63d61d6d3caa9a7124f9e5ad601714253c27b97bc9a60f3a9369f2f358ed19fbdfcefcbb10
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

vcpkg_python_test_import(MODULE "trove_classifiers")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-trove-classifiers/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-trove-classifiers",
"version": "2024.9.12",
"description": "Canonical source for classifiers on PyPI (pypi.org).",
"homepage": "https://github.com/pypa/trove-classifiers",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-urllib3/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME urllib3
VERSION ${VERSION}
SHA512 f461cc959d675b8b13c2f40f4b021cab01ccb3a5033143f5c3eae3fce7486115994d198c78db9ef353fce47c17b25e0ecb010fbdebc1b8731d4fd708054b39cc
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

vcpkg_python_test_import(MODULE "urllib3")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
29 changes: 29 additions & 0 deletions ports/py-urllib3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "py-urllib3",
"version": "2.2.3",
"description": "HTTP library with thread-safe connection pooling, file post, and more.",
"homepage": "https://github.com/urllib3/urllib3",
"dependencies": [
{
"name": "py-hatch-vcs",
"host": true
},
{
"name": "py-hatchling",
"host": true
},
{
"name": "py-setuptools",
"host": true
},
{
"name": "py-setuptools-scm",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
5 changes: 5 additions & 0 deletions ports/vcpkg-tool-mercurial/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled)

configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY)

file(INSTALL "${VCPKG_ROOT_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
43 changes: 43 additions & 0 deletions ports/vcpkg-tool-mercurial/vcpkg-port-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Overwrite builtin scripts
include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-tool-lessmsi/vcpkg-port-config.cmake")

function(vcpkg_get_mercurial OUT)
set(version "6.4.2")
set(tool_names "hg")
set(tool_subdirectory "tortoisehg-${version}-x64")
set(download_urls "https://www.mercurial-scm.org/release/tortoisehg/windows/tortoisehg-${version}-x64.msi")
set(download_filename "tortoisehg-${version}-x64")
set(download_sha512 f5b665f5c584f611057dc35ae361a9d637da8b286203e3d6b61a29d11c9bf56d3c7ea753142428038fe510b5bcb0c8c7b1a76ec8a8ccb69b8e565eac99f0e4a4)

find_program(MERCURIAL NAMES "${tool_names}" PATHS "${DOWNLOADS}/tools/${tool_subdirectory}")

if(NOT MERCURIAL)
vcpkg_download_distfile(archive_path
URLS ${download_urls}
SHA512 "${download_sha512}"
FILENAME "${download_filename}"
)

set(output_path "${DOWNLOADS}/tools/${tool_subdirectory}")

file(MAKE_DIRECTORY "${output_path}")
cmake_path(NATIVE_PATH archive_path archive_path_native) # lessmsi is a bit picky about path formats.
message(STATUS "Extracting mercurial ...")
vcpkg_execute_in_download_mode(
COMMAND "${LESSMSI}" x "${archive_path_native}" # Using output_path here does not work in bash
WORKING_DIRECTORY "${output_path}"
OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/lessmsi-${TARGET_TRIPLET}-out.log"
ERROR_FILE "${CURRENT_BUILDTREES_DIR}/lessmsi-${TARGET_TRIPLET}-err.log"
RESULT_VARIABLE error_code
)
if(error_code)
message(FATAL_ERROR "Couldn't extract mercurial with lessmsi!")
endif()
message(STATUS "Extracting mercurial ... finished!")
file(COPY "${output_path}/tortoisehg-6.4/SourceDir/PFiles/TortoiseHg/" DESTINATION "${output_path}")
file(REMOVE_RECURSE "${output_path}/tortoisehg-6.4")
set(MERCURIAL "${output_path}/hg.exe")
endif()

set(${OUT} "${MERCURIAL}" PARENT_SCOPE)
endfunction()
14 changes: 14 additions & 0 deletions ports/vcpkg-tool-mercurial/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "vcpkg-tool-mercurial",
"version-date": "2023-06-27",
"description": "Mercurial SCM",
"homepage": "https://www.mercurial-scm.org/",
"license": "MIT",
"supports": "native",
"dependencies": [
{
"name": "vcpkg-tool-lessmsi",
"platform": "windows"
}
]
}
Loading

0 comments on commit 874cc76

Please sign in to comment.