Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests #47

Merged
merged 3 commits into from
Oct 11, 2024
Merged
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 .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
./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-matplotlib
./vcpkg/vcpkg install $VCPKG_OPTIONS py-requests
# ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pyqt6

- name: 📑 Upload logs
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ 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 py-urllib3 py-markupsafe
.\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 py-requests
# py-matplotlib

- name: 📑 Upload logs
uses: actions/upload-artifact@v4
Expand Down
16 changes: 16 additions & 0 deletions ports/py-charset-normalizer/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 charset_normalizer
VERSION ${VERSION}
SHA512 7b7098d389bf4b181bd26037fa439abb44811ee68b01b78bfd399b4213cca7309d4878e90a0983d6aa2c550c3b9b355c8b5157fae731981f3e6e4028a911d143
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

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

vcpkg_python_test_import(MODULE "charset_normalizer")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-charset-normalizer/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-charset-normalizer",
"version": "3.4.0",
"description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.",
"homepage": "https://github.com/Ousret/charset_normalizer",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-idna/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 idna
VERSION ${VERSION}
SHA512 bdc00fb42c48a34ec3df91b0592fe41785061f891a252ce82f168d99089a52e8e5bc7a823794f61e7915c0f691d911ed8b3bf7aecf3e2aeb3fc85da4ef35f47e
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

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

vcpkg_python_test_import(MODULE "idna")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-idna/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-idna",
"version": "3.10",
"description": "Internationalized Domain Names in Applications (IDNA)",
"homepage": "https://github.com/kjd/idna",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
3 changes: 2 additions & 1 deletion ports/py-matplotlib/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "py-matplotlib",
"version": "3.9.2",
"port-version": 1,
"description": "Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.",
"homepage": "https://matplotlib.org/stable/",
"license": null,
"dependencies": [
"freetype",
"numpy",
"py-certifi",
"py-cycler",
"py-dateutil",
Expand All @@ -16,6 +16,7 @@
"name": "py-meson",
"host": true
},
"py-numpy",
"py-pillow",
"py-pyparsing",
{
Expand Down
16 changes: 16 additions & 0 deletions ports/py-requests/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 requests
VERSION ${VERSION}
SHA512 20d413597ff4803a62156ada25ef2e8a5edd0d4dbf7d79cc7fcd88d51a76e019a7dacf41d7c3d546306f37c506ede68f16b9afea57c918db64e702382b1ae420
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

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

vcpkg_python_test_import(MODULE "requests")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
21 changes: 21 additions & 0 deletions ports/py-requests/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "py-requests",
"version": "2.32.3",
"description": "Python HTTP for Humans.",
"homepage": "https://requests.readthedocs.io/",
"dependencies": [
"py-certifi",
"py-charset-normalizer",
"py-idna",
{
"name": "py-setuptools",
"host": true
},
"py-urllib3",
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
1 change: 1 addition & 0 deletions ports/pybind11/TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix config file not finding python
12 changes: 12 additions & 0 deletions ports/pybind11/fix-debug-link.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d93203..031088a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,6 +196,7 @@ if(NOT TARGET pybind11_headers)

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
cxx_right_angle_brackets)
+ target_compile_definitions (pybind11_headers INTERFACE $<$<CONFIG:Debug>:Py_DEBUG>)
if(NOT "${PYBIND11_INTERNALS_VERSION}" STREQUAL "")
target_compile_definitions(
pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION}")
38 changes: 38 additions & 0 deletions ports/pybind11/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pybind/pybind11
REF "v${VERSION}"
SHA512 ed1512ff0bca3bc0a45edc2eb8c77f8286ab9389f6ff1d5cb309be24bc608abbe0df6a7f5cb18c8f80a3bfa509058547c13551c3cd6a759af708fd0cdcdd9e95
HEAD_REF master
PATCHES
fix-debug-link.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPYBIND11_TEST=OFF
# Disable all Python searching, Python required only for tests
-DPYBIND11_NOPYTHON=ON
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/pybind11")
vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

if("scripts" IN_LIST FEATURES)
set(ENV{SETUPTOOLS_SCM_PRETEND_VERSION} "${VERSION}")

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/pybind11/include"
"${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/pybind11/share"
)

endif()
23 changes: 23 additions & 0 deletions ports/pybind11/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pybind11 provides CMake targets. There are two modes provided; classic, which is built on the old Python
discovery packages in CMake, or the new FindPython mode, which uses FindPython
from 3.12+ forward (3.15+ _highly_ recommended).

New FindPython mode:

find_package(Python COMPONENTS Interpreter Development)
find_package(pybind11 CONFIG)

# pybind11 method:
pybind11_add_module(MyModule1 src1.cpp)

# Python method:
Python_add_library(MyModule2 src2.cpp)
target_link_libraries(MyModule2 pybind11::headers)
set_target_properties(MyModule2 PROPERTIES
INTERPROCEDURAL_OPTIMIZATION ON
CXX_VISIBILITY_PRESET ON
VISIBILITY_INLINES_HIDDEN ON
)

For more information see here:
https://pybind11.readthedocs.io/en/latest/compiling.html#building-with-cmake
31 changes: 31 additions & 0 deletions ports/pybind11/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "pybind11",
"version": "2.11.1",
"description": "pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code",
"homepage": "https://github.com/pybind/pybind11",
"license": "BSD-3-Clause",
"supports": "!(arm & windows)",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"scripts": {
"description": "Install pybind python scripts",
"dependencies": [
"py-setuptools",
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
}
}
18 changes: 17 additions & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"baseline": "2024-02-02",
"port-version": 0
},
"py-charset-normalizer": {
"baseline": "3.4.0",
"port-version": 0
},
"py-contourpy": {
"baseline": "1.3.0",
"port-version": 0
Expand Down Expand Up @@ -56,6 +60,10 @@
"baseline": "1.25.0",
"port-version": 0
},
"py-idna": {
"baseline": "3.10",
"port-version": 0
},
"py-installer": {
"baseline": "0.7.0",
"port-version": 1
Expand All @@ -70,7 +78,7 @@
},
"py-matplotlib": {
"baseline": "3.9.2",
"port-version": 0
"port-version": 1
},
"py-meson": {
"baseline": "0.15.0",
Expand Down Expand Up @@ -140,6 +148,10 @@
"baseline": "2.14.1",
"port-version": 2
},
"py-requests": {
"baseline": "2.32.3",
"port-version": 0
},
"py-semantic-version": {
"baseline": "2.10.0",
"port-version": 0
Expand Down Expand Up @@ -180,6 +192,10 @@
"baseline": "0.43.0",
"port-version": 0
},
"pybind11": {
"baseline": "2.11.1",
"port-version": 0
},
"python3": {
"baseline": "3.11.10",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/p-/py-charset-normalizer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "e01ac0dd36f0d344a6c7ae761336aad75196aff0",
"version": "3.4.0",
"port-version": 0
}
]
}
9 changes: 9 additions & 0 deletions versions/p-/py-idna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "85d7271b6cabc6337cefe0e1564c47e747b6a577",
"version": "3.10",
"port-version": 0
}
]
}
5 changes: 5 additions & 0 deletions versions/p-/py-matplotlib.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "68ebff1cccff9cea5155674352969b92bf0e7098",
"version": "3.9.2",
"port-version": 1
},
{
"git-tree": "f3192febdadd86034af1079e4d8bdbbe64c1d9cd",
"version": "3.9.2",
Expand Down
9 changes: 9 additions & 0 deletions versions/p-/py-requests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "c734b292cf9d6385396ef9f74df9e5d72047d2fd",
"version": "2.32.3",
"port-version": 0
}
]
}
9 changes: 9 additions & 0 deletions versions/p-/pybind11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "1769f6654a2deb82dd7dfe3a3ae67e31100e7515",
"version": "2.11.1",
"port-version": 0
}
]
}
Loading