From ecbf402c7aaaee096568dbbb0740e14a3529d025 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Tue, 5 Mar 2024 19:00:13 +0100 Subject: [PATCH 01/26] Make README.md copy-pastable Include all ports --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c1c649e..ac6951b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,11 @@ Enable registries feature flag in vcpkg and write a vcpkg-configuration.json fil { "kind": "git", "repository": "https://github.com/open-vcpkg/vcpkg-python.git", - "packages": [ "List the packages to use from this registry here" ] + "packages": [ + "python3", + "vcpkg-python-scripts", + "py-*" + ] } ] } From feee129da1dd8c71ab561981ea5697b991019b4f Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 10:23:45 +0100 Subject: [PATCH 02/26] Add dll search path on windows via dedicated port --- ports/py-add-vcpkg-dll-path/portfile.cmake | 3 + ports/py-add-vcpkg-dll-path/sitecustomize.py | 8 ++ ports/py-add-vcpkg-dll-path/vcpkg.json | 10 ++ ports/py-sip/vcpkg.json | 6 +- ports/python3/add-vcpkg-search-path.patch | 126 ------------------- ports/python3/portfile.cmake | 2 +- ports/python3/vcpkg.json | 2 +- 7 files changed, 28 insertions(+), 129 deletions(-) create mode 100644 ports/py-add-vcpkg-dll-path/portfile.cmake create mode 100644 ports/py-add-vcpkg-dll-path/sitecustomize.py create mode 100644 ports/py-add-vcpkg-dll-path/vcpkg.json delete mode 100644 ports/python3/add-vcpkg-search-path.patch diff --git a/ports/py-add-vcpkg-dll-path/portfile.cmake b/ports/py-add-vcpkg-dll-path/portfile.cmake new file mode 100644 index 0000000..59b0bc8 --- /dev/null +++ b/ports/py-add-vcpkg-dll-path/portfile.cmake @@ -0,0 +1,3 @@ +file(COPY "${SOURCE_PATH}/sitecustomize.py" DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}") + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/py-add-vcpkg-dll-path/sitecustomize.py b/ports/py-add-vcpkg-dll-path/sitecustomize.py new file mode 100644 index 0000000..5d69b37 --- /dev/null +++ b/ports/py-add-vcpkg-dll-path/sitecustomize.py @@ -0,0 +1,8 @@ +import os +import sys +from pathlib import Path + +vcpkg_bin_path = Path(sys.prefix) / '/../../bin' +if not vcpkg_bin_path.is_dir(): + raise RuntimeError('Could not add "{vcpkg_bin_path}" to dll paths because it does not exist.') +os.add_dll_directory(vcpkg_bin_path) \ No newline at end of file diff --git a/ports/py-add-vcpkg-dll-path/vcpkg.json b/ports/py-add-vcpkg-dll-path/vcpkg.json new file mode 100644 index 0000000..acb4cea --- /dev/null +++ b/ports/py-add-vcpkg-dll-path/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "py-add-vcpkg-dll-path", + "version-date": "2024-03-13", + "description": "Adds the vcpkg dll path to python", + "license": "MIT", + "supports": "windows", + "dependencies": [ + "vcpkg-python.scripts" + ] +} diff --git a/ports/py-sip/vcpkg.json b/ports/py-sip/vcpkg.json index 4128173..d7adfda 100644 --- a/ports/py-sip/vcpkg.json +++ b/ports/py-sip/vcpkg.json @@ -1,7 +1,7 @@ { "name": "py-sip", "version": "6.7.12", - "port-version": 3, + "port-version": 4, "description": "A tool that makes it easy to create Python bindings for C and C++ libraries", "homepage": "https://www.riverbankcomputing.com/software/sip", "dependencies": [ @@ -12,6 +12,10 @@ { "name": "vcpkg-python-scripts", "host": true + }, + { + "name": "py-add-vcpkg-dll-path", + "platform": "windows" } ] } diff --git a/ports/python3/add-vcpkg-search-path.patch b/ports/python3/add-vcpkg-search-path.patch deleted file mode 100644 index 5236c4c..0000000 --- a/ports/python3/add-vcpkg-search-path.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c -index eeaf20b46..13bb1fe7b 100644 ---- a/Python/pylifecycle.c -+++ b/Python/pylifecycle.c -@@ -32,7 +32,10 @@ - #ifdef MS_WINDOWS - # undef BYTE - # include "windows.h" -- -+# include -+# include -+# include -+# include - extern PyTypeObject PyWindowsConsoleIO_Type; - # define PyWindowsConsoleIO_Check(op) \ - (PyObject_TypeCheck((op), &PyWindowsConsoleIO_Type)) -@@ -88,8 +91,97 @@ __attribute__ ((section (".PyRuntime"))) - = _PyRuntimeState_INIT; - _Py_COMP_DIAG_POP - - static int runtime_initialized = 0; - -+#if defined(MS_WINDOWS) -+ -+typedef void (WINAPI *ADD)(PCWSTR NewDirectory); -+ -+static int* is_vcpkg_search_path_added(void) { -+ static int is_search_path_added = 0; -+ return &is_search_path_added; -+} -+ -+static ADD getAddDllDirectory(void) { -+ static ADD pAddDllDirectory = NULL; -+ if(pAddDllDirectory == NULL) { -+ pAddDllDirectory = (ADD)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "AddDllDirectory"); -+ } -+ return pAddDllDirectory; -+} -+ -+PyStatus Init_vcpkg_DllSearchPath(void) { -+ HMODULE dll_handle = NULL; -+ static wchar_t *module_dirname = NULL; -+ -+ if (GetModuleHandleExW((GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT), -+ (LPCWSTR) &Init_vcpkg_DllSearchPath, &dll_handle) == 0) { -+ // Getting the pythonxx.dll path failed -+ } -+ -+ int buffer_size = 1024; -+ module_dirname = (wchar_t*)malloc(buffer_size*sizeof(wchar_t)); -+ if( module_dirname == NULL) -+ return PyStatus_NoMemory(); -+ if(GetModuleFileNameW(dll_handle, module_dirname, buffer_size - 1) == 0) { -+ // Call Failed! -+ return PyStatus_Error("vcpkg: Unable to retrieve module file name!"); -+ } -+ -+ wchar_t *old_module_dirname; -+ while( GetLastError() == ERROR_INSUFFICIENT_BUFFER) -+ { -+ buffer_size += buffer_size/2; -+ old_module_dirname = module_dirname; -+ module_dirname = (wchar_t*)realloc(module_dirname,buffer_size*sizeof(wchar_t)); -+ if( module_dirname == NULL) { -+ // No memory? -+ free(old_module_dirname); -+ return PyStatus_NoMemory(); -+ } -+ if(GetModuleFileNameW(dll_handle, &module_dirname[0], buffer_size - 1) == 0) { -+ return PyStatus_Error("vcpkg: Unable to retrieve module file name!"); -+ } -+ } -+ -+ wchar_t* last_path_seperator = wcsrchr(module_dirname, L'\\'); -+ -+ if(last_path_seperator) { -+ last_path_seperator[0] = L'\0'; // Remove file name from module_dirname -+ } -+ -+ const wchar_t python_path[] = L"\\tools\\python3"; -+ const size_t python_path_len = wcslen(python_path); -+ const size_t module_dirname_len = wcslen(module_dirname); -+ wchar_t* prefix_path_sep = wcsstr(module_dirname, python_path); -+ -+ const size_t remaining_len = (size_t)(prefix_path_sep - module_dirname) - (module_dirname_len-python_path_len); -+ -+ if(prefix_path_sep == NULL || remaining_len != 0) { -+ free(module_dirname); -+ return PyStatus_Ok(); // We are somewhere then vcpkg -> do nothing -+ } -+ -+ prefix_path_sep[1] = L'b'; // module_dirname is now vcpkg_bin_dir -+ prefix_path_sep[2] = L'i'; -+ prefix_path_sep[3] = L'n'; -+ prefix_path_sep[4] = L'\0'; -+ -+ DWORD fileattr = GetFileAttributesW(module_dirname); -+ -+ if( fileattr & FILE_ATTRIBUTE_DIRECTORY && !*is_vcpkg_search_path_added()) { -+ ADD pAddDllDirectory = getAddDllDirectory(); -+ pAddDllDirectory(module_dirname); -+ fwprintf(stderr, L"Added vcpkg bin path to search for dlls. Path added: %ls \n", module_dirname); -+ *is_vcpkg_search_path_added() = 1; -+ } -+ -+ free(module_dirname); -+ return PyStatus_Ok(); -+}; -+ -+#endif -+ - PyStatus - _PyRuntime_Initialize(void) - { -@@ -102,6 +193,11 @@ _PyRuntime_Initialize(void) - } - runtime_initialized = 1; - -+#ifdef MS_WINDOWS -+ PyStatus err = Init_vcpkg_DllSearchPath(); -+ if(PyStatus_IsError(err)) -+ return err; -+#endif - return _PyRuntimeState_Init(&_PyRuntime); - } - diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index eba8c7f..696e1f9 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -34,7 +34,7 @@ set(PATCHES 0014-fix-get-python-inc-output.patch 0015-dont-use-WINDOWS-def.patch 0018-fix-sysconfig-include.patch - add-vcpkg-search-path.patch + # add-vcpkg-search-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index 5a85db2..97bf845 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,7 +1,7 @@ { "name": "python3", "version": "3.11.5", - "port-version": 5, + "port-version": 6, "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "license": "Python-2.0", From 78cc76d273f42ae820c1751f66417cdc997e38c5 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 10:29:38 +0100 Subject: [PATCH 03/26] Update ports/py-add-vcpkg-dll-path/vcpkg.json --- ports/py-add-vcpkg-dll-path/vcpkg.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/py-add-vcpkg-dll-path/vcpkg.json b/ports/py-add-vcpkg-dll-path/vcpkg.json index acb4cea..19f333d 100644 --- a/ports/py-add-vcpkg-dll-path/vcpkg.json +++ b/ports/py-add-vcpkg-dll-path/vcpkg.json @@ -5,6 +5,7 @@ "license": "MIT", "supports": "windows", "dependencies": [ - "vcpkg-python.scripts" + "vcpkg-python-scripts" + ] } From 7ffef857b9c3fea5d0f7242cdea9d939c741b47f Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 11:26:13 +0100 Subject: [PATCH 04/26] Make py-add-vcpkg-dll-path a dependency of python3 --- ports/py-add-vcpkg-dll-path/portfile.cmake | 4 +++- ports/py-sip/vcpkg.json | 6 +----- ports/python3/vcpkg.json | 6 +++++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ports/py-add-vcpkg-dll-path/portfile.cmake b/ports/py-add-vcpkg-dll-path/portfile.cmake index 59b0bc8..cf85624 100644 --- a/ports/py-add-vcpkg-dll-path/portfile.cmake +++ b/ports/py-add-vcpkg-dll-path/portfile.cmake @@ -1,3 +1,5 @@ -file(COPY "${SOURCE_PATH}/sitecustomize.py" DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}") +file(INSTALL + "${CMAKE_CURRENT_LIST_DIR}sitecustomize.py" + DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}") set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/py-sip/vcpkg.json b/ports/py-sip/vcpkg.json index d7adfda..4128173 100644 --- a/ports/py-sip/vcpkg.json +++ b/ports/py-sip/vcpkg.json @@ -1,7 +1,7 @@ { "name": "py-sip", "version": "6.7.12", - "port-version": 4, + "port-version": 3, "description": "A tool that makes it easy to create Python bindings for C and C++ libraries", "homepage": "https://www.riverbankcomputing.com/software/sip", "dependencies": [ @@ -12,10 +12,6 @@ { "name": "vcpkg-python-scripts", "host": true - }, - { - "name": "py-add-vcpkg-dll-path", - "platform": "windows" } ] } diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index 97bf845..4e21b13 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -49,7 +49,11 @@ "host": true, "platform": "windows" }, - "zlib" + "zlib", + { + "name": "py-add-vcpkg-dll-path", + "platform": "windows" + } ], "features": { "deprecated-win7-support": { From 4df3a4f4581e98c9d0405920e7a946c4cbf5f25a Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 11:26:54 +0100 Subject: [PATCH 05/26] Remove leftover --- ports/python3/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 696e1f9..6fa0d70 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -34,7 +34,6 @@ set(PATCHES 0014-fix-get-python-inc-output.patch 0015-dont-use-WINDOWS-def.patch 0018-fix-sysconfig-include.patch - # add-vcpkg-search-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 5f78d4f5eccb40beea848b22d29853c873fa3679 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 11:27:27 +0100 Subject: [PATCH 06/26] Typo --- ports/py-add-vcpkg-dll-path/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/py-add-vcpkg-dll-path/portfile.cmake b/ports/py-add-vcpkg-dll-path/portfile.cmake index cf85624..f63a0bf 100644 --- a/ports/py-add-vcpkg-dll-path/portfile.cmake +++ b/ports/py-add-vcpkg-dll-path/portfile.cmake @@ -1,5 +1,5 @@ file(INSTALL - "${CMAKE_CURRENT_LIST_DIR}sitecustomize.py" + "${CMAKE_CURRENT_LIST_DIR}/sitecustomize.py" DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}") set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) From 45c4ccb46a8a4bff4a8d47ea97bb4dcee1f2cc44 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 12:10:53 +0100 Subject: [PATCH 07/26] Hardcode path --- ports/py-add-vcpkg-dll-path/portfile.cmake | 2 +- ports/py-add-vcpkg-dll-path/vcpkg.json | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ports/py-add-vcpkg-dll-path/portfile.cmake b/ports/py-add-vcpkg-dll-path/portfile.cmake index f63a0bf..91ff58f 100644 --- a/ports/py-add-vcpkg-dll-path/portfile.cmake +++ b/ports/py-add-vcpkg-dll-path/portfile.cmake @@ -1,5 +1,5 @@ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/sitecustomize.py" - DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}") + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/python3/Lib") set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/py-add-vcpkg-dll-path/vcpkg.json b/ports/py-add-vcpkg-dll-path/vcpkg.json index 19f333d..96642e8 100644 --- a/ports/py-add-vcpkg-dll-path/vcpkg.json +++ b/ports/py-add-vcpkg-dll-path/vcpkg.json @@ -3,9 +3,5 @@ "version-date": "2024-03-13", "description": "Adds the vcpkg dll path to python", "license": "MIT", - "supports": "windows", - "dependencies": [ - "vcpkg-python-scripts" - - ] + "supports": "windows" } From 47d6b128c7ed7761e67d838c653d9bc88567beb7 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 12:56:41 +0100 Subject: [PATCH 08/26] Update sitecustomize.py --- ports/py-add-vcpkg-dll-path/sitecustomize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/py-add-vcpkg-dll-path/sitecustomize.py b/ports/py-add-vcpkg-dll-path/sitecustomize.py index 5d69b37..d73ad7b 100644 --- a/ports/py-add-vcpkg-dll-path/sitecustomize.py +++ b/ports/py-add-vcpkg-dll-path/sitecustomize.py @@ -4,5 +4,5 @@ vcpkg_bin_path = Path(sys.prefix) / '/../../bin' if not vcpkg_bin_path.is_dir(): - raise RuntimeError('Could not add "{vcpkg_bin_path}" to dll paths because it does not exist.') -os.add_dll_directory(vcpkg_bin_path) \ No newline at end of file + raise RuntimeError(f'Could not add "{vcpkg_bin_path}" to dll paths because it does not exist.') +os.add_dll_directory(vcpkg_bin_path) From adb1b88223bc0176550253214c79688eb7b189c4 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 13 Mar 2024 12:58:57 +0100 Subject: [PATCH 09/26] Add a license and some metadata --- ports/py-add-vcpkg-dll-path/portfile.cmake | 1 + ports/py-add-vcpkg-dll-path/vcpkg.json | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/py-add-vcpkg-dll-path/portfile.cmake b/ports/py-add-vcpkg-dll-path/portfile.cmake index 91ff58f..5648b3b 100644 --- a/ports/py-add-vcpkg-dll-path/portfile.cmake +++ b/ports/py-add-vcpkg-dll-path/portfile.cmake @@ -2,4 +2,5 @@ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/sitecustomize.py" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/python3/Lib") +file(INSTALL "${VCPKG_ROOT_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/py-add-vcpkg-dll-path/vcpkg.json b/ports/py-add-vcpkg-dll-path/vcpkg.json index 96642e8..bcb285b 100644 --- a/ports/py-add-vcpkg-dll-path/vcpkg.json +++ b/ports/py-add-vcpkg-dll-path/vcpkg.json @@ -2,6 +2,7 @@ "name": "py-add-vcpkg-dll-path", "version-date": "2024-03-13", "description": "Adds the vcpkg dll path to python", + "documentation": "https://vcpkg.io/en/docs/README.html", "license": "MIT", "supports": "windows" } From 5dd7ae29d208ea0dcdfffa2134d539de15c45be3 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 14 Mar 2024 13:55:36 +0100 Subject: [PATCH 10/26] [py-pyyaml] New port --- ports/py-pyyaml/portfile.cmake | 12 ++++++++++++ ports/py-pyyaml/vcpkg.json | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ports/py-pyyaml/portfile.cmake create mode 100644 ports/py-pyyaml/vcpkg.json diff --git a/ports/py-pyyaml/portfile.cmake b/ports/py-pyyaml/portfile.cmake new file mode 100644 index 0000000..8236234 --- /dev/null +++ b/ports/py-pyyaml/portfile.cmake @@ -0,0 +1,12 @@ +vcpkg_from_pythonhosted( + OUT_SOURCE_PATH SOURCE_PATH + PACKAGE_NAME PyYAML + VERSION ${VERSION} + SHA512 37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008 +) + +vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}" OPTIONS -x) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/py-pyyaml/vcpkg.json b/ports/py-pyyaml/vcpkg.json new file mode 100644 index 0000000..71f233b --- /dev/null +++ b/ports/py-pyyaml/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "py-pyyaml", + "version": "6.0.1", + "description": "YAML parser and emitter for Python", + "homepage": "https://pyyaml.org/", + "dependencies": [ + { + "name": "py-setuptools", + "host": true + }, + "python3", + { + "name": "vcpkg-python-scripts", + "host": true + } + ] +} From 59b126b2892533f2aec38efb49ff4556521e607a Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 14 Mar 2024 13:56:51 +0100 Subject: [PATCH 11/26] Test py-pyyaml --- .github/workflows/windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 775dc92..15a85a1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -57,7 +57,9 @@ jobs: - name: 🌋 Build run: | - .\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 + .\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build \ + py-pyqt6 \ + py-pyyaml - name: 📑 Upload logs uses: actions/upload-artifact@v4 From 3b7876b45381f656e80e292e8919171b7f6b6e3e Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 14 Mar 2024 13:58:46 +0100 Subject: [PATCH 12/26] Update windows.yml --- .github/workflows/windows.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 15a85a1..6d9d81f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -57,9 +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 + .\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 py-pyyaml - name: 📑 Upload logs uses: actions/upload-artifact@v4 From dbeba509eba88ea5d1ed348af44b91272883c792 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 14 Mar 2024 14:32:21 +0100 Subject: [PATCH 13/26] sha --- ports/py-pyyaml/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/py-pyyaml/portfile.cmake b/ports/py-pyyaml/portfile.cmake index 8236234..2461fee 100644 --- a/ports/py-pyyaml/portfile.cmake +++ b/ports/py-pyyaml/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_pythonhosted( OUT_SOURCE_PATH SOURCE_PATH PACKAGE_NAME PyYAML VERSION ${VERSION} - SHA512 37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008 + SHA512 94a29924484f557c0966d485c2b70232909253f27fcea9b89e1db1462abf61f2f85d55fbae0177b2bed70eb5daa75813551e868df4df4cddfdee9a87bd08485f ) vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}" OPTIONS -x) From 1b757963f749da01b93a3cdfee29b91a7ac3a862 Mon Sep 17 00:00:00 2001 From: m-kuhn Date: Thu, 14 Mar 2024 13:44:13 +0000 Subject: [PATCH 14/26] Update versions.db --- versions/baseline.json | 4 ++++ versions/p-/py-pyyaml.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/p-/py-pyyaml.json diff --git a/versions/baseline.json b/versions/baseline.json index eae6af6..c85cc17 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -48,6 +48,10 @@ "baseline": "13.6.0", "port-version": 0 }, + "py-pyyaml": { + "baseline": "6.0.1", + "port-version": 0 + }, "py-setuptools": { "baseline": "69.0.3", "port-version": 2 diff --git a/versions/p-/py-pyyaml.json b/versions/p-/py-pyyaml.json new file mode 100644 index 0000000..6d142b4 --- /dev/null +++ b/versions/p-/py-pyyaml.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "f8e1d0d2c4a76affec737023f08372e400ff38a4", + "version": "6.0.1", + "port-version": 0 + } + ] +} From 43a76c810de2521b707c70769d9734d40fdce9fd Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Fri, 15 Mar 2024 05:11:23 +0100 Subject: [PATCH 15/26] Update ports/py-add-vcpkg-dll-path/portfile.cmake --- ports/py-add-vcpkg-dll-path/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/py-add-vcpkg-dll-path/portfile.cmake b/ports/py-add-vcpkg-dll-path/portfile.cmake index 5648b3b..0ec18a3 100644 --- a/ports/py-add-vcpkg-dll-path/portfile.cmake +++ b/ports/py-add-vcpkg-dll-path/portfile.cmake @@ -2,5 +2,6 @@ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/sitecustomize.py" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/python3/Lib") -file(INSTALL "${VCPKG_ROOT_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${VCPKG_ROOT_DIR}/LICENSE.txt") + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) From 7afc0e69fb93dcce51421c999d65512d8f23fcf2 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 22 Apr 2024 08:30:46 +0200 Subject: [PATCH 16/26] Add py-numpy --- .github/workflows/windows.yml | 2 +- ports/py-cython/portfile.cmake | 18 +++++ ports/py-cython/vcpkg.json | 15 ++++ ports/py-numpy/portfile.cmake | 125 +++++++++++++++++++++++++++++++++ ports/py-numpy/vcpkg.json | 28 ++++++++ 5 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 ports/py-cython/portfile.cmake create mode 100644 ports/py-cython/vcpkg.json create mode 100644 ports/py-numpy/portfile.cmake create mode 100644 ports/py-numpy/vcpkg.json diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6d9d81f..0c2e011 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 + .\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 py-pyyaml py-numpy - name: 📑 Upload logs uses: actions/upload-artifact@v4 diff --git a/ports/py-cython/portfile.cmake b/ports/py-cython/portfile.cmake new file mode 100644 index 0000000..96be858 --- /dev/null +++ b/ports/py-cython/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cython/cython + REF ${VERSION} + SHA512 585d3fe810ace55278fcc6ea4508b3b5259320f92998cd688da787cd5f88ac5fc2467025f20da6d968969eb3296ae9c517136d24a4dbb475441271227968f6be + HEAD_REF main +) + +vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") + +if(NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_copy_tools(TOOL_NAMES cygdb cython cythonize DESTINATION "${CURRENT_PACKAGES_DIR}/${VCPKG_PYTHON3_SCRIPTS}" AUTO_CLEAN) +endif() + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) \ No newline at end of file diff --git a/ports/py-cython/vcpkg.json b/ports/py-cython/vcpkg.json new file mode 100644 index 0000000..ac4c3ef --- /dev/null +++ b/ports/py-cython/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "py-cython", + "version": "3.0.5", + "description": "Cython is a Python compiler that makes writing C extensions for Python as easy as Python itself. Cython is based on Pyrex, but supports more cutting edge functionality and optimizations.", + "homepage": "https://cython.org/", + "license": "Apache-2.0", + "dependencies": [ + "py-setuptools", + "python3", + { + "name": "vcpkg-python-scripts", + "host": true + } + ] +} diff --git a/ports/py-numpy/portfile.cmake b/ports/py-numpy/portfile.cmake new file mode 100644 index 0000000..f4f8168 --- /dev/null +++ b/ports/py-numpy/portfile.cmake @@ -0,0 +1,125 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Numpy includes are stored in the module itself +set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) +set(VCPKG_BUILD_TYPE release) # No debug builds required for pure python modules since vcpkg does not install a debug python executable. + +#TODO: Fix E:\vcpkg_folders\numpy\installed\x64-windows-release\tools\python3\Lib\site-packages\numpy\testing\_private\extbuild.py + +set(VCPKG_PYTHON3_BASEDIR "${CURRENT_HOST_INSTALLED_DIR}/tools/python3") +find_program(VCPKG_PYTHON3 NAMES python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} python${PYTHON3_VERSION_MAJOR} python PATHS "${VCPKG_PYTHON3_BASEDIR}" NO_DEFAULT_PATH) +find_program(VCPKG_CYTHON NAMES cython PATHS "${VCPKG_PYTHON3_BASEDIR}" "${VCPKG_PYTHON3_BASEDIR}/Scripts" NO_DEFAULT_PATH) + +set(ENV{PYTHON3} "${VCPKG_PYTHON3}") +set(PYTHON3 "${VCPKG_PYTHON3}") + +vcpkg_add_to_path(PREPEND "${VCPKG_PYTHON3_BASEDIR}") +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_add_to_path(PREPEND "${VCPKG_PYTHON3_BASEDIR}/Scripts") +endif() + +cmake_path(GET SCRIPT_MESON PARENT_PATH MESON_DIR) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO numpy/numpy + REF v${VERSION} + SHA512 01b6a124c72d082f1dafdd98cdaaa84ab57f2bf0112d89d9355fa458a04deb8309c7e78449767429049971793c040e51412060681218a51c671ac6086dba2fa4 + HEAD_REF main +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH_SIMD + REPO intel/x86-simd-sort + REF 0631a88763a4a0a4c9e84d5eeb0ec5d36053730b + SHA512 cd44796fc10e13004932be05d5bee46070e061bcc429c7ee8d9e11520e18c45bdec2f4fcd3555d9769891a763e151b0a0a4c00385ea30f24c99da1c65d736e39 + HEAD_REF main +) + +file(COPY "${SOURCE_PATH_SIMD}/" DESTINATION "${SOURCE_PATH}/numpy/core/src/npysort/x86-simd-sort") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH_MESON_NUMPY + REPO numpy/meson + REF 4e370ca8ab73c07f7b84abe8a4b937caace050a4 + SHA512 dec6e3b9428f95790f85a863778227a73e4f432f8f54e87d61fd6499b5a0723c59a334fcaf880afd59ae50c924d8f2cfa340a143f752cb39f976c731ca0ea123 + HEAD_REF main +) + +file(COPY "${SOURCE_PATH_MESON_NUMPY}/mesonbuild/modules/features" DESTINATION "${MESON_DIR}/mesonbuild/modules") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH_SVML + REPO numpy/SVML + REF 1b21e453f6b1ba6a6aca392b1d810d9d41576123 + SHA512 c9ea7bf9effbf5750750ddfdfc7db3d95614ed176bd4540d68eddb90a15f819510e9564c9454ef34be02dd6a8e48a7f292a70cb5b63c25c3d1c450a8e3b77d35 + HEAD_REF main +) + +file(COPY "${SOURCE_PATH_SVML}/" DESTINATION "${SOURCE_PATH}/numpy/core/src/umath/svml") + +vcpkg_replace_string("${SOURCE_PATH}/meson.build" "py.dependency()" "dependency('python-3.${PYTHON3_VERSION_MINOR}', method : 'pkg-config')") + +#debug replacement +vcpkg_replace_string("${SOURCE_PATH}/numpy/_build_utils/tempita.py" "import argparse" "import argparse\nprint(sys.executable)\nimport os\n +print(os.environ['PATH'])") + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CROSSCOMPILING AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(opts + ADDITIONAL_PROPERTIES + "longdouble_format = 'IEEE_DOUBLE_LE'" + ) +endif() + +message(STATUS "PATH is: '$ENV{PATH}'") +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dblas=blas + -Dlapack=lapack + #-Duse-ilp64=true + ADDITIONAL_BINARIES + cython=['${VCPKG_CYTHON}'] + python3=['${VCPKG_PYTHON3}'] +# python=['${VCPKG_PYTHON3}'] + ${opts} + ) +message(STATUS "PATH is: '$ENV{PATH}'") +vcpkg_install_meson() +message(STATUS "PATH is: '$ENV{PATH}'") +vcpkg_fixup_pkgconfig() + +#E:\vcpkg_folders\numpy\packages\numpy_arm64-windows-release\tools\python3\Lib\site-packages\numpy\__config__.py +# "path": r"E:/vcpkg_folders/numpy/installed/x64-windows-release/tools/python3/python.exe", and full paths to compilers +#"commands": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/arm64/cl.exe, -DWIN32, -D_WINDOWS, -W3, -utf-8, -MP, -MD, -O2, -Oi, -Gy, -DNDEBUG, -Z7", + +set(subdir "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/") +if(VCPKG_TARGET_IS_WINDOWS) + set(subdir "${CURRENT_PACKAGES_DIR}/lib/site-packages/") +endif() +set(pyfile "${subdir}/numpy/__config__.py") +file(READ "${pyfile}" contents) +string(REPLACE "${CURRENT_INSTALLED_DIR}" "$(prefix)" contents "${contents}") +string(REPLACE "r\"${VCPKG_PYTHON3}\"" "sys.executable" contents "${contents}") +file(WRITE "${pyfile}" "${contents}") + + +if(VCPKG_TARGET_IS_WINDOWS) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/site-packages/numpy" "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/numpy") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") + +# Add required Metadata for some python build plugins +file(WRITE "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/numpy-${VERSION}.dist-info/METADATA" +"Metadata-Version: 2.1\n\ +Name: numpy\n\ +Version: ${VERSION}" +) + +vcpkg_python_test_import(MODULE "numpy") diff --git a/ports/py-numpy/vcpkg.json b/ports/py-numpy/vcpkg.json new file mode 100644 index 0000000..630a698 --- /dev/null +++ b/ports/py-numpy/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "py-numpy", + "version": "1.26.4", + "description": "The fundamental package for scientific computing with Python.", + "homepage": "https://www.numpy.org/", + "license": "BSD-3-Clause", + "dependencies": [ + "blas", + "lapack", + { + "name": "py-cython", + "host": true + }, + "python3", + { + "name": "python3", + "host": true + }, + { + "name": "vcpkg-python-scripts", + "host": true + }, + { + "name": "vcpkg-tool-meson", + "host": true + } + ] +} From 5e0a9c11ac193725268d551f482e4b4f4eb884df Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sun, 12 May 2024 08:08:47 +0200 Subject: [PATCH 17/26] Bump python to 3.11.9 --- ports/python3/portfile.cmake | 2 +- ports/python3/vcpkg.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index eba8c7f..b24ec25 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -73,7 +73,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 63c1cc817844584c9ea880be0277ebcc18182c5050f59ebbb8dd42c971979bb2cee0f09af6a1e62a6c8c23143dfa6ff21fc1aba25ef50a425fdea46ff3e35896 + SHA512 124bca045e2e456856aae92c4740755cda41706c1b06ebecfcc65db6bdd1a259ecfc8fe54a673592f83163f6dd51606ffebcb7104d3be23f5bfc290eefa07ee2 HEAD_REF master PATCHES ${PATCHES} ) diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index 5a85db2..629ae67 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,7 +1,6 @@ { "name": "python3", - "version": "3.11.5", - "port-version": 5, + "version": "3.11.9", "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "license": "Python-2.0", From 2f3e74f72703d215b122335c7faab9a3a88cd134 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sun, 12 May 2024 08:43:07 +0200 Subject: [PATCH 18/26] Bump baseline for openssl 3.3 --- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d14d9cc..6dea8ba 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v4 with: repository: microsoft/vcpkg - ref: 345ac44ab8d6a16239d3af55df9608bf725e7a48 # TODO: can we have a canonical baseline for tests? + ref: a1212c93cabaa9c5c36c1ffdb4bddd59fdf31e43 # TODO: can we have a canonical baseline for tests? path: vcpkg fetch-depth: 1 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6d9d81f..79ec36d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v4 with: repository: microsoft/vcpkg - ref: 345ac44ab8d6a16239d3af55df9608bf725e7a48 # TODO: can we have a canonical baseline for tests? + ref: a1212c93cabaa9c5c36c1ffdb4bddd59fdf31e43 # TODO: can we have a canonical baseline for tests? path: vcpkg fetch-depth: 1 From f3c9ac0f073203392d3db01ffde3a8c87062d233 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sun, 12 May 2024 10:06:44 +0200 Subject: [PATCH 19/26] Bump pyqt6 to 6.7.0 --- ports/py-pyqt6/portfile.cmake | 2 +- ports/py-pyqt6/vcpkg.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/py-pyqt6/portfile.cmake b/ports/py-pyqt6/portfile.cmake index 3f700a0..9734fcb 100644 --- a/ports/py-pyqt6/portfile.cmake +++ b/ports/py-pyqt6/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_from_pythonhosted( OUT_SOURCE_PATH SOURCE_PATH PACKAGE_NAME PyQt6 VERSION ${VERSION} - SHA512 c2ff8c47c9b0e43c009d0c90f565a54344e6f384c67dd30c2d422465d0702c07713acc0095c8b67827d1146675611c07d548ba282a26e41bb60a0a21977a7a64 + SHA512 619210d2de3e149b55e2d45cbd8ec2113b3effcaccd25eef6067ea99b82e250f1ce288b38136604536053690071f8c843339b934b5ce5e539a5dfdecc26f44d2 ) # https://www.riverbankcomputing.com/static/Docs/PyQt6/installation.html diff --git a/ports/py-pyqt6/vcpkg.json b/ports/py-pyqt6/vcpkg.json index f80df70..5d5b5fe 100644 --- a/ports/py-pyqt6/vcpkg.json +++ b/ports/py-pyqt6/vcpkg.json @@ -1,7 +1,6 @@ { "name": "py-pyqt6", - "version": "6.6.1", - "port-version": 2, + "version": "6.7.0", "description": "Python bindings for the Qt cross platform application toolkit", "homepage": "https://www.riverbankcomputing.com/software/pyqt/", "dependencies": [ From 5a50b4444618d75f719c7442503fc65aa9d1d58b Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sun, 12 May 2024 11:08:05 +0200 Subject: [PATCH 20/26] Bump pyqtbuilder --- ports/py-pyqt-builder/portfile.cmake | 3 ++- ports/py-pyqt-builder/vcpkg.json | 3 +-- ports/py-sip/portfile.cmake | 2 +- ports/py-sip/vcpkg.json | 3 +-- ports/vcpkg-python-scripts/vcpkg.json | 3 +-- ports/vcpkg-python-scripts/vcpkg_python_functions.cmake | 7 +++++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ports/py-pyqt-builder/portfile.cmake b/ports/py-pyqt-builder/portfile.cmake index c4a2057..2effe25 100644 --- a/ports/py-pyqt-builder/portfile.cmake +++ b/ports/py-pyqt-builder/portfile.cmake @@ -1,8 +1,9 @@ vcpkg_from_pythonhosted( OUT_SOURCE_PATH SOURCE_PATH PACKAGE_NAME PyQt-builder + FILE_NAME pyqt_builder VERSION ${VERSION} - SHA512 ec0b9f7784a32af744111615b93f98d73f284bb752fd71359c798d3b093a01925823effea72c866a5f49f77e3dfc5dee4125bbb289f647d84000bf34b5db6931 + SHA512 64fc969799a12a176eb730fdc4581f18293dceb8edff20db0177ce409fe7e712cdfb07449b6c4abdd33f1fd9aabe8bee248fe9aeb5373df533d805f9d2a0c6a5 PATCHES libpath.patch ) diff --git a/ports/py-pyqt-builder/vcpkg.json b/ports/py-pyqt-builder/vcpkg.json index 4ddd987..483034f 100644 --- a/ports/py-pyqt-builder/vcpkg.json +++ b/ports/py-pyqt-builder/vcpkg.json @@ -1,7 +1,6 @@ { "name": "py-pyqt-builder", - "version": "1.15.4", - "port-version": 3, + "version": "1.16.2", "description": "PyQt-builder is the PEP 517 compliant build system for PyQt and projects that extend PyQt. It extends the SIP build system and uses Qt’s qmake to perform the actual compilation and installation of extension modules.", "homepage": "https://www.riverbankcomputing.com/software/pyqt-builder", "dependencies": [ diff --git a/ports/py-sip/portfile.cmake b/ports/py-sip/portfile.cmake index def8d8e..6cccc8e 100644 --- a/ports/py-sip/portfile.cmake +++ b/ports/py-sip/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_pythonhosted( OUT_SOURCE_PATH SOURCE_PATH PACKAGE_NAME sip VERSION ${VERSION} - SHA512 885c32a051e882b82b59bf1365050933f8fc1c619b19f4bc03235edc5741a5e14aae8edf90479ad0283f74ba5c5233a2589c151ec865b130199a6db9800a2294 + SHA512 8a0ff1c16ead4c2b1c53963a015fb3d149362f649eeec2523e6b243945493f28f5ecf29aabbf5cee5f7909ded40d64a1f469d2d0c1b3c33244e6213ab23ec733 ) vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}" OPTIONS -x) diff --git a/ports/py-sip/vcpkg.json b/ports/py-sip/vcpkg.json index 4128173..5d9cb60 100644 --- a/ports/py-sip/vcpkg.json +++ b/ports/py-sip/vcpkg.json @@ -1,7 +1,6 @@ { "name": "py-sip", - "version": "6.7.12", - "port-version": 3, + "version": "6.8.3", "description": "A tool that makes it easy to create Python bindings for C and C++ libraries", "homepage": "https://www.riverbankcomputing.com/software/sip", "dependencies": [ diff --git a/ports/vcpkg-python-scripts/vcpkg.json b/ports/vcpkg-python-scripts/vcpkg.json index 267bca2..89c1cf8 100644 --- a/ports/vcpkg-python-scripts/vcpkg.json +++ b/ports/vcpkg-python-scripts/vcpkg.json @@ -1,7 +1,6 @@ { "name": "vcpkg-python-scripts", - "version-date": "2023-06-28", - "port-version": 2, + "version-date": "2024-05-12", "documentation": "https://vcpkg.io/en/docs/README.html", "license": "MIT", "supports": "native", diff --git a/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake b/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake index 8c37cf6..cc97e26 100644 --- a/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake +++ b/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake @@ -5,7 +5,7 @@ function(vcpkg_from_pythonhosted) PARSE_ARGV 0 "arg" "" - "OUT_SOURCE_PATH;PACKAGE_NAME;VERSION;SHA512" + "OUT_SOURCE_PATH;PACKAGE_NAME;FILE_NAME;VERSION;SHA512" "PATCHES") if(DEFINED arg_UNPARSED_ARGUMENTS) @@ -21,10 +21,13 @@ function(vcpkg_from_pythonhosted) if(NOT DEFINED arg_VERSION) message(FATAL_ERROR "VERSION must be specified.") endif() + if(NOT DEFINED arg_FILE_NAME) + set(arg_FILE_NAME ${arg_PACKAGE_NAME}) + endif() string(SUBSTRING "${arg_PACKAGE_NAME}" 0 1 _PACKAGE_PREFIX) vcpkg_download_distfile(ARCHIVE - URLS "https://files.pythonhosted.org/packages/source/${_PACKAGE_PREFIX}/${arg_PACKAGE_NAME}/${arg_PACKAGE_NAME}-${arg_VERSION}.tar.gz" + URLS "https://files.pythonhosted.org/packages/source/${_PACKAGE_PREFIX}/${arg_PACKAGE_NAME}/${arg_FILE_NAME}-${arg_VERSION}.tar.gz" FILENAME "${arg_PACKAGE_NAME}-${arg_VERSION}.tar.gz" SHA512 ${arg_SHA512} ) From 3ffb858bc0482b6edfdebd596bdcd322fc9ff103 Mon Sep 17 00:00:00 2001 From: m-kuhn Date: Sun, 12 May 2024 09:55:57 +0000 Subject: [PATCH 21/26] Update versions.db --- versions/baseline.json | 20 ++++++++++---------- versions/p-/py-pyqt-builder.json | 5 +++++ versions/p-/py-pyqt6.json | 5 +++++ versions/p-/py-sip.json | 5 +++++ versions/p-/python3.json | 5 +++++ versions/v-/vcpkg-python-scripts.json | 5 +++++ 6 files changed, 35 insertions(+), 10 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index c85cc17..067485c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -37,12 +37,12 @@ "port-version": 0 }, "py-pyqt-builder": { - "baseline": "1.15.4", - "port-version": 3 + "baseline": "1.16.2", + "port-version": 0 }, "py-pyqt6": { - "baseline": "6.6.1", - "port-version": 2 + "baseline": "6.7.0", + "port-version": 0 }, "py-pyqt6-sip": { "baseline": "13.6.0", @@ -57,20 +57,20 @@ "port-version": 2 }, "py-sip": { - "baseline": "6.7.12", - "port-version": 3 + "baseline": "6.8.3", + "port-version": 0 }, "py-wheel": { "baseline": "0.41.3", "port-version": 0 }, "python3": { - "baseline": "3.11.5", - "port-version": 5 + "baseline": "3.11.9", + "port-version": 0 }, "vcpkg-python-scripts": { - "baseline": "2023-06-28", - "port-version": 2 + "baseline": "2024-05-12", + "port-version": 0 } } } diff --git a/versions/p-/py-pyqt-builder.json b/versions/p-/py-pyqt-builder.json index 2d1cab5..da3cf1f 100644 --- a/versions/p-/py-pyqt-builder.json +++ b/versions/p-/py-pyqt-builder.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "de33c3055de8537c3e6cccb3da9c583e35f25c3b", + "version": "1.16.2", + "port-version": 0 + }, { "git-tree": "6c399a96d52870d45bdffb015f756b903cce4a0c", "version": "1.15.4", diff --git a/versions/p-/py-pyqt6.json b/versions/p-/py-pyqt6.json index ce4d3b6..5d77b40 100644 --- a/versions/p-/py-pyqt6.json +++ b/versions/p-/py-pyqt6.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ba88a69a5ad266dd3e38c827013ad7658dd6332f", + "version": "6.7.0", + "port-version": 0 + }, { "git-tree": "77f0c67035084e86141a37b7baaab335cc6979ae", "version": "6.6.1", diff --git a/versions/p-/py-sip.json b/versions/p-/py-sip.json index 4dce631..655a025 100644 --- a/versions/p-/py-sip.json +++ b/versions/p-/py-sip.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "58743eb1d7613465a1960ae160b1ea965cecd4ab", + "version": "6.8.3", + "port-version": 0 + }, { "git-tree": "3df0a8a0fb5d32457b4b8bba4df08889ac2b659a", "version": "6.7.12", diff --git a/versions/p-/python3.json b/versions/p-/python3.json index 848c9c5..795e06b 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d520641592647c77c8f3a09fdd19c7ae4c78f125", + "version": "3.11.9", + "port-version": 0 + }, { "git-tree": "cf3e1b8d5b92a0315a4499c5bdd332199055ad9a", "version": "3.11.5", diff --git a/versions/v-/vcpkg-python-scripts.json b/versions/v-/vcpkg-python-scripts.json index 5f5e43b..acd6d66 100644 --- a/versions/v-/vcpkg-python-scripts.json +++ b/versions/v-/vcpkg-python-scripts.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ab78815c930d32e44ada3df45aec6ff16981a804", + "version-date": "2024-05-12", + "port-version": 0 + }, { "git-tree": "5beddc1fe845dc192e7c1c6a069885c6b3ccc15a", "version-date": "2023-06-28", From 66079a7b57f368cc65b9bf13650cf16bf40c3927 Mon Sep 17 00:00:00 2001 From: m-kuhn Date: Sun, 12 May 2024 10:17:34 +0000 Subject: [PATCH 22/26] Update versions.db --- versions/baseline.json | 8 ++++++++ versions/p-/py-cython.json | 9 +++++++++ versions/p-/py-numpy.json | 9 +++++++++ 3 files changed, 26 insertions(+) create mode 100644 versions/p-/py-cython.json create mode 100644 versions/p-/py-numpy.json diff --git a/versions/baseline.json b/versions/baseline.json index 067485c..7ca59b7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4,6 +4,10 @@ "baseline": "0.10.0", "port-version": 1 }, + "py-cython": { + "baseline": "3.0.5", + "port-version": 0 + }, "py-flit-core": { "baseline": "3.9.0", "port-version": 1 @@ -16,6 +20,10 @@ "baseline": "0.7.0", "port-version": 1 }, + "py-numpy": { + "baseline": "1.26.4", + "port-version": 0 + }, "py-packaging": { "baseline": "23.1", "port-version": 1 diff --git a/versions/p-/py-cython.json b/versions/p-/py-cython.json new file mode 100644 index 0000000..f14cff7 --- /dev/null +++ b/versions/p-/py-cython.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "41aba2588b57228303245a392e6986894774d0a2", + "version": "3.0.5", + "port-version": 0 + } + ] +} diff --git a/versions/p-/py-numpy.json b/versions/p-/py-numpy.json new file mode 100644 index 0000000..e13bcfa --- /dev/null +++ b/versions/p-/py-numpy.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "e314c4fb47fa3a236fd61a40cc6ac0985faf96c9", + "version": "1.26.4", + "port-version": 0 + } + ] +} From 92ec54ed0ace1a712d5975c3413a21c8c3eb8ffe Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 13 May 2024 08:40:59 +0200 Subject: [PATCH 23/26] Integrate https://github.com/yaml/pyyaml/pull/731 --- ports/py-pyyaml/cy-me-a-river.patch | 17 +++++++++++++++++ ports/py-pyyaml/portfile.cmake | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 ports/py-pyyaml/cy-me-a-river.patch diff --git a/ports/py-pyyaml/cy-me-a-river.patch b/ports/py-pyyaml/cy-me-a-river.patch new file mode 100644 index 0000000..95d88f9 --- /dev/null +++ b/ports/py-pyyaml/cy-me-a-river.patch @@ -0,0 +1,17 @@ +diff --git a/setup.py b/setup.py +index 65b0ea0..4461580 100644 +--- a/setup.py ++++ b/setup.py +@@ -82,7 +82,11 @@ if 'sdist' in sys.argv or os.environ.get('PYYAML_FORCE_CYTHON') == '1': + with_cython = True + try: + from Cython.Distutils.extension import Extension as _Extension +- from Cython.Distutils import build_ext as _build_ext ++ try: ++ from Cython.Distutils.old_build_ext import old_build_ext as _build_ext ++ except ImportError: ++ from Cython.Distutils import build_ext as _build_ext ++ + with_cython = True + except ImportError: + if with_cython: diff --git a/ports/py-pyyaml/portfile.cmake b/ports/py-pyyaml/portfile.cmake index 2461fee..2d98912 100644 --- a/ports/py-pyyaml/portfile.cmake +++ b/ports/py-pyyaml/portfile.cmake @@ -3,6 +3,8 @@ vcpkg_from_pythonhosted( PACKAGE_NAME PyYAML VERSION ${VERSION} SHA512 94a29924484f557c0966d485c2b70232909253f27fcea9b89e1db1462abf61f2f85d55fbae0177b2bed70eb5daa75813551e868df4df4cddfdee9a87bd08485f + PATCHES + cy-me-a-river.patch ) vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}" OPTIONS -x) From 86ef80116a23a8f721e19b00e003b110b4e841d4 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 13 May 2024 10:26:15 +0200 Subject: [PATCH 24/26] version --- ports/py-pyyaml/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/py-pyyaml/vcpkg.json b/ports/py-pyyaml/vcpkg.json index 71f233b..dc1e492 100644 --- a/ports/py-pyyaml/vcpkg.json +++ b/ports/py-pyyaml/vcpkg.json @@ -1,6 +1,7 @@ { "name": "py-pyyaml", "version": "6.0.1", + "port-version": 1, "description": "YAML parser and emitter for Python", "homepage": "https://pyyaml.org/", "dependencies": [ From 3eec6c9bafc8094b5eed005450651b865a476a33 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 13 May 2024 10:46:47 +0200 Subject: [PATCH 25/26] Expand description --- ports/py-add-vcpkg-dll-path/sitecustomize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/py-add-vcpkg-dll-path/sitecustomize.py b/ports/py-add-vcpkg-dll-path/sitecustomize.py index d73ad7b..967fc9e 100644 --- a/ports/py-add-vcpkg-dll-path/sitecustomize.py +++ b/ports/py-add-vcpkg-dll-path/sitecustomize.py @@ -4,5 +4,5 @@ vcpkg_bin_path = Path(sys.prefix) / '/../../bin' if not vcpkg_bin_path.is_dir(): - raise RuntimeError(f'Could not add "{vcpkg_bin_path}" to dll paths because it does not exist.') + raise RuntimeError(f'Could not add "{vcpkg_bin_path}" to dll paths because it does not exist. If you copied the files from vcpkg either delete this file or adjust it accordingly.') os.add_dll_directory(vcpkg_bin_path) From bcb470e7f16d95db46e7469b863a0bf2d5b21ba0 Mon Sep 17 00:00:00 2001 From: m-kuhn Date: Mon, 13 May 2024 11:28:16 +0000 Subject: [PATCH 26/26] Update versions.db --- versions/baseline.json | 8 ++++++-- versions/p-/py-add-vcpkg-dll-path.json | 9 +++++++++ versions/p-/py-pyyaml.json | 5 +++++ versions/p-/python3.json | 5 +++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 versions/p-/py-add-vcpkg-dll-path.json diff --git a/versions/baseline.json b/versions/baseline.json index 7ca59b7..e4935f0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1,5 +1,9 @@ { "default": { + "py-add-vcpkg-dll-path": { + "baseline": "2024-03-13", + "port-version": 0 + }, "py-build": { "baseline": "0.10.0", "port-version": 1 @@ -58,7 +62,7 @@ }, "py-pyyaml": { "baseline": "6.0.1", - "port-version": 0 + "port-version": 1 }, "py-setuptools": { "baseline": "69.0.3", @@ -74,7 +78,7 @@ }, "python3": { "baseline": "3.11.9", - "port-version": 0 + "port-version": 1 }, "vcpkg-python-scripts": { "baseline": "2024-05-12", diff --git a/versions/p-/py-add-vcpkg-dll-path.json b/versions/p-/py-add-vcpkg-dll-path.json new file mode 100644 index 0000000..a5c407f --- /dev/null +++ b/versions/p-/py-add-vcpkg-dll-path.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "e56d4a619b29c0ff5d8caf4048f40fe62a232969", + "version-date": "2024-03-13", + "port-version": 0 + } + ] +} diff --git a/versions/p-/py-pyyaml.json b/versions/p-/py-pyyaml.json index 6d142b4..773bc23 100644 --- a/versions/p-/py-pyyaml.json +++ b/versions/p-/py-pyyaml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e3f18e832ae1b0ed4893d7718d5956a837a99e3e", + "version": "6.0.1", + "port-version": 1 + }, { "git-tree": "f8e1d0d2c4a76affec737023f08372e400ff38a4", "version": "6.0.1", diff --git a/versions/p-/python3.json b/versions/p-/python3.json index 795e06b..0c13264 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a61e0b93e8d97a3abecfadb913dc74ab197dac30", + "version": "3.11.9", + "port-version": 1 + }, { "git-tree": "d520641592647c77c8f3a09fdd19c7ae4c78f125", "version": "3.11.9",