diff --git a/.github/actions/setup-vcpkg/action.yml b/.github/actions/setup-vcpkg/action.yml index 5e09207f..e501c0b8 100644 --- a/.github/actions/setup-vcpkg/action.yml +++ b/.github/actions/setup-vcpkg/action.yml @@ -17,6 +17,8 @@ runs: run: | . <(curl https://aka.ms/vcpkg-init.sh -L) echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV + # osx dynamic fix, bandaid until next vcpkg tool release + wget https://raw.githubusercontent.com/microsoft/vcpkg/9558037875497b9db8cf38fcd7db68ec661bffe7/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake -O ${VCPKG_ROOT}/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake - name: Setup vcpkg if: runner.os == 'Windows' diff --git a/.github/workflows/macos-dynamic.yml b/.github/workflows/macos-dynamic.yml new file mode 100644 index 00000000..e4bbda04 --- /dev/null +++ b/.github/workflows/macos-dynamic.yml @@ -0,0 +1,87 @@ +--- +name: 🍎 MacOS Dynamic +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build-osx-dynamic: + permissions: + contents: read + packages: write + strategy: + matrix: + include: + - os: macos-13 + triplet: x64-osx-dynamic + - os: macos-14 + triplet: arm64-osx-dynamic + env: + buildtrees: /Users/runner/vcpkg-build + name: build (macos) + runs-on: ${{ matrix.os }} + + steps: + - name: 🐣 Checkout + uses: actions/checkout@v4 + + - name: 🐩 Install CMake and Ninja + uses: lukka/get-cmake@latest + + - name: 🧽 Developer Command Prompt for Microsoft Visual C++ + uses: ilammy/msvc-dev-cmd@v1 + + - name: 🔨 Prepare build env + run: | + brew install autoconf automake autoconf-archive libtool + + - name: 🐕 Checkout vcpkg + uses: actions/checkout@v4 + with: + repository: microsoft/vcpkg + ref: e60236ee051183f1122066bee8c54a0b47c43a60 # TODO: can we have a canonical baseline for tests? + path: vcpkg + fetch-depth: 1 + + - name: 🐾 Bootstrap vcpkg + shell: bash + run: | + wget https://raw.githubusercontent.com/microsoft/vcpkg/f9dfb066d02fa62015e5c27acb4801cb482d5890/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake -O vcpkg/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake + PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1) + ./vcpkg/bootstrap-vcpkg.sh + NUGET_EXE=$(./vcpkg/vcpkg fetch nuget | grep '^\/.*nuget.exe$') + echo "Downloaded $NUGET_EXE" + mono $NUGET_EXE sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText + mono $NUGET_EXE setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" + echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV + VCPKG_ROOT=$(pwd)/vcpkg + echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV + echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV + + - name: 🌋 Build + run: | + VCPKG_OPTIONS="--overlay-ports="${{ github.workspace }}/ports" --host-triplet=${{ matrix.triplet }} --triplet=${{ matrix.triplet }} --x-buildtrees-root=${{ env.buildtrees }}" + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pip \ + py-sip \ + py-numpy \ + py-psycopg2 \ + py-urllib3 \ + py-markupsafe \ + py-matplotlib \ + py-requests \ + py-isort \ + py-autopep8 \ + py-pyqt6 + + - name: 📑 Upload logs + uses: actions/upload-artifact@v4 + if: failure() + with: + name: logs-${{ matrix.triplet }} + path: ${{ env.buildtrees }}/**/*.log diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1c0fa3ca..baf34b83 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -66,18 +66,18 @@ jobs: - name: 🌋 Build run: | VCPKG_OPTIONS="--overlay-ports="${{ github.workspace }}/ports" --host-triplet=${{ matrix.triplet }} --triplet=${{ matrix.triplet }} --x-buildtrees-root=${{ env.buildtrees }}" - ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pip - ./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-matplotlib - ./vcpkg/vcpkg install $VCPKG_OPTIONS py-requests - ./vcpkg/vcpkg install $VCPKG_OPTIONS py-isort - ./vcpkg/vcpkg install $VCPKG_OPTIONS py-autopep8 - ./vcpkg/vcpkg install $VCPKG_OPTIONS py-flask - # ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pyqt6 + ./vcpkg/vcpkg install $VCPKG_OPTIONS py-pip \ + py-sip \ + py-numpy \ + py-psycopg2 \ + py-urllib3 \ + py-markupsafe \ + py-matplotlib \ + py-requests \ + py-isort \ + py-autopep8 \ + py-flask \ + py-pyqt6 - name: 📑 Upload logs uses: actions/upload-artifact@v4 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 659ede4a..f4265d01 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -57,8 +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 py-urllib3 py-markupsafe py-requests py-isort py-autopep8 py-flask - # py-matplotlib + .\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-isort py-autopep8 py-flask py-matplotlib - name: 📑 Upload logs uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..95ef7c6b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.orig diff --git a/ports/py-matplotlib/portfile.cmake b/ports/py-matplotlib/portfile.cmake index 95042fb7..276890eb 100755 --- a/ports/py-matplotlib/portfile.cmake +++ b/ports/py-matplotlib/portfile.cmake @@ -9,7 +9,11 @@ vcpkg_from_github( set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig;${CURRENT_INSTALLED_DIR}/share/pkgconfig") set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") -set(PYTHON3 "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python${VCPKG_HOST_EXECUTABLE_SUFFIX}") +if(VCPKG_TARGET_IS_WINDOWS) + set(PYTHON3 "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python.exe") +else() + set(PYTHON3 "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR}") +endif() vcpkg_mesonpy_prepare_build_options(OUTPUT meson_opts) z_vcpkg_setup_pkgconfig_path(CONFIG "RELEASE") diff --git a/ports/py-matplotlib/vcpkg.json b/ports/py-matplotlib/vcpkg.json index f8688bab..8466d37a 100755 --- a/ports/py-matplotlib/vcpkg.json +++ b/ports/py-matplotlib/vcpkg.json @@ -1,7 +1,7 @@ { "name": "py-matplotlib", "version": "3.9.2", - "port-version": 1, + "port-version": 2, "description": "Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.", "homepage": "https://matplotlib.org/stable/", "license": null, diff --git a/ports/py-meson/portfile.cmake b/ports/py-meson/portfile.cmake index 7bcbd545..b8ffc602 100755 --- a/ports/py-meson/portfile.cmake +++ b/ports/py-meson/portfile.cmake @@ -15,9 +15,12 @@ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/python3/Lib") -file(RENAME "${CURRENT_PACKAGES_DIR}/Lib/site-packages/" "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/Lib") +if(VCPKG_TARGET_IS_WINDOWS) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/python3/Lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/Lib/site-packages/" "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/Lib") +endif() + vcpkg_python_test_import(MODULE "mesonpy") diff --git a/ports/py-meson/vcpkg-port-config.cmake b/ports/py-meson/vcpkg-port-config.cmake index fdf574ee..44a1d39c 100755 --- a/ports/py-meson/vcpkg-port-config.cmake +++ b/ports/py-meson/vcpkg-port-config.cmake @@ -1,3 +1,4 @@ # Overwrite builtin scripts include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-tool-meson/vcpkg-port-config.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake") include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_mesonpy_prepare_build_options.cmake") diff --git a/ports/py-meson/vcpkg.json b/ports/py-meson/vcpkg.json index 5ba6c81e..e00bdd54 100755 --- a/ports/py-meson/vcpkg.json +++ b/ports/py-meson/vcpkg.json @@ -1,6 +1,7 @@ { "name": "py-meson", "version": "0.15.0", + "port-version": 1, "description": "Meson PEP 517 Python build backend", "homepage": "https://github.com/mesonbuild/meson-python", "license": "MIT", diff --git a/ports/py-meson/vcpkg_mesonpy_prepare_build_options.cmake b/ports/py-meson/vcpkg_mesonpy_prepare_build_options.cmake index f3cea164..d70ab933 100755 --- a/ports/py-meson/vcpkg_mesonpy_prepare_build_options.cmake +++ b/ports/py-meson/vcpkg_mesonpy_prepare_build_options.cmake @@ -24,6 +24,12 @@ function(vcpkg_mesonpy_prepare_build_options) vcpkg_add_to_path(PREPEND "${NINJA_PATH}") # Prepend to use the correct ninja. vcpkg_find_acquire_program(PYTHON3) + x_vcpkg_get_python_packages( + PYTHON_VERSION 3 + PYTHON_EXECUTABLE ${PYTHON3} + PACKAGES gpep517 setuptools-scm + OUT_PYTHON_VAR PYTHON3 + ) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) vcpkg_add_to_path(PREPEND "${PYTHON3_DIR}") @@ -118,4 +124,4 @@ function(vcpkg_mesonpy_prepare_build_options) endforeach() set("${arg_OUTPUT}" ${arg_OPTIONS} ${arg_OPTIONS_RELEASE} PARENT_SCOPE) -endfunction() \ No newline at end of file +endfunction() diff --git a/ports/py-tomli/portfile.cmake b/ports/py-tomli/portfile.cmake index d74d59e6..75ff877e 100755 --- a/ports/py-tomli/portfile.cmake +++ b/ports/py-tomli/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hukkin/tomli - REF 36ef51d6a5a55e0eca077b58695390d041061bd4 - SHA512 fe47a06dddad298dd64975f7618e7c8d03de83a8f4b44da868abd78e062138ad9df18fbc810e55e4cb240fac2c3c023b18ee4e87cab5e93cd776b34fac497bdf + REF ${VERSION} + SHA512 3eeea334d6d225590a9e074685c65d052e2f5d5286ca895ff7e9532d7289f0daa31ae67b5076d803e5adad4f20a9831058a0c4599715f049079904934d3d9c25 HEAD_REF main ) diff --git a/ports/py-tomli/vcpkg.json b/ports/py-tomli/vcpkg.json index eaedfb0d..4665fb6d 100755 --- a/ports/py-tomli/vcpkg.json +++ b/ports/py-tomli/vcpkg.json @@ -1,8 +1,8 @@ { "name": "py-tomli", - "version": "2.0.1", + "version": "2.0.2", "description": "A simple, correct Python build frontend ", - "homepage": "py-build.readthedocs.io/en/stable/", + "homepage": "https://github.com/hukkin/tomli", "license": "MIT", "dependencies": [ "vcpkg-python-scripts" diff --git a/ports/vcpkg-python-scripts/vcpkg-port-config.cmake b/ports/vcpkg-python-scripts/vcpkg-port-config.cmake index 37e2c1b6..2c27e94e 100644 --- a/ports/vcpkg-python-scripts/vcpkg-port-config.cmake +++ b/ports/vcpkg-python-scripts/vcpkg-port-config.cmake @@ -1,6 +1,7 @@ include_guard(GLOBAL) include("${CMAKE_CURRENT_LIST_DIR}/../python3/vcpkg-port-config.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-cmake-get-vars/vcpkg-port-config.cmake") set(PYTHON3_BASEDIR "${CURRENT_INSTALLED_DIR}/tools/python3") find_program(PYTHON3 NAMES python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} python${PYTHON3_VERSION_MAJOR} python PATHS "${PYTHON3_BASEDIR}" NO_DEFAULT_PATH) diff --git a/ports/vcpkg-python-scripts/vcpkg.json b/ports/vcpkg-python-scripts/vcpkg.json index 6a2106ce..0eab0262 100644 --- a/ports/vcpkg-python-scripts/vcpkg.json +++ b/ports/vcpkg-python-scripts/vcpkg.json @@ -1,11 +1,15 @@ { "name": "vcpkg-python-scripts", "version-date": "2024-05-12", - "port-version": 2, + "port-version": 4, "documentation": "https://vcpkg.io/en/docs/README.html", "license": "MIT", "supports": "native", "dependencies": [ - "python3" + "python3", + { + "name": "vcpkg-cmake-get-vars", + "host": true + } ] } diff --git a/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake b/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake index 4bc5ffae..ff09471d 100644 --- a/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake +++ b/ports/vcpkg-python-scripts/vcpkg_python_functions.cmake @@ -1,8 +1,6 @@ set(ENV{SETUPTOOLS_SCM_PRETEND_VERSION} "${VERSION}") set(ENV{PDM_BUILD_SCM_VERSION} "${VERSION}") -set(z_vcpkg_python_func_python "${PYTHON3}") - function(vcpkg_from_pythonhosted) cmake_parse_arguments( PARSE_ARGV 0 @@ -82,8 +80,16 @@ function(vcpkg_python_build_wheel) endforeach() endif() + vcpkg_cmake_get_vars(cmake_vars_file) + include("${cmake_vars_file}") + + set(ENV{CFLAGS} "${VCPKG_COMBINED_C_FLAGS_RELEASE}") + set(ENV{CXXFLAGS} "${VCPKG_COMBINED_CXX_FLAGS_RELEASE}") + set(ENV{LDFLAGS} "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE}") + set(ENV{ARFLAGS} "${VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE}") + vcpkg_execute_required_process( - COMMAND ${env} "${z_vcpkg_python_func_python}" -m gpep517 build-wheel --wheel-dir "${z_vcpkg_wheeldir}" --output-fd 1 ${build_ops} + COMMAND ${env} "${PYTHON3}" -m gpep517 build-wheel --wheel-dir "${z_vcpkg_wheeldir}" --output-fd 1 ${build_ops} LOGNAME "python-build-${TARGET_TRIPLET}" WORKING_DIRECTORY "${arg_SOURCE_PATH}" ) @@ -120,7 +126,7 @@ function(vcpkg_python_install_wheel) endif() message(STATUS "Installing python wheel:'${arg_WHEEL}'") - vcpkg_execute_required_process(COMMAND "${z_vcpkg_python_func_python}" -m installer + vcpkg_execute_required_process(COMMAND "${PYTHON3}" -m installer --prefix "${install_prefix}" --destdir "${CURRENT_PACKAGES_DIR}" "${arg_WHEEL}" LOGNAME "python-installer-${TARGET_TRIPLET}" @@ -182,7 +188,7 @@ function(vcpkg_python_test_import) set(PACKAGE_SITE_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/${RELATIVE_SITE_PACKAGES_DIR}") configure_file("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-python-scripts/import_test.py.in" "${CURRENT_BUILDTREES_DIR}/import_test.py" @ONLY) - vcpkg_execute_required_process(COMMAND "${z_vcpkg_python_func_python}" "${CURRENT_BUILDTREES_DIR}/import_test.py" + vcpkg_execute_required_process(COMMAND "${PYTHON3}" "${CURRENT_BUILDTREES_DIR}/import_test.py" LOGNAME "python-test-import-${TARGET_TRIPLET}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" ) diff --git a/versions/baseline.json b/versions/baseline.json index 2aaeddc2..501f936e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -110,11 +110,11 @@ }, "py-matplotlib": { "baseline": "3.9.2", - "port-version": 1 + "port-version": 2 }, "py-meson": { "baseline": "0.15.0", - "port-version": 0 + "port-version": 1 }, "py-numpy": { "baseline": "1.26.4", @@ -221,7 +221,7 @@ "port-version": 0 }, "py-tomli": { - "baseline": "2.0.1", + "baseline": "2.0.2", "port-version": 0 }, "py-trove-classifiers": { @@ -258,7 +258,7 @@ }, "vcpkg-python-scripts": { "baseline": "2024-05-12", - "port-version": 2 + "port-version": 4 }, "vcpkg-tool-mercurial": { "baseline": "2023-06-27", diff --git a/versions/p-/py-matplotlib.json b/versions/p-/py-matplotlib.json index a24a61d8..d71b74e8 100644 --- a/versions/p-/py-matplotlib.json +++ b/versions/p-/py-matplotlib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4cefbf5ed25506114385052ed64fb927b88daaeb", + "version": "3.9.2", + "port-version": 2 + }, { "git-tree": "68ebff1cccff9cea5155674352969b92bf0e7098", "version": "3.9.2", diff --git a/versions/p-/py-meson.json b/versions/p-/py-meson.json index 68704d56..14bdeda5 100644 --- a/versions/p-/py-meson.json +++ b/versions/p-/py-meson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5e75d7c8be60987fe672073dabcfed3dfa27d5f7", + "version": "0.15.0", + "port-version": 1 + }, { "git-tree": "492c2cf2e21e3339e428c8ac609d556f87847d27", "version": "0.15.0", diff --git a/versions/p-/py-tomli.json b/versions/p-/py-tomli.json index cc17b5e7..7a002964 100644 --- a/versions/p-/py-tomli.json +++ b/versions/p-/py-tomli.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "06070c900ac80a4563e56f72648b093c601b97a5", + "version": "2.0.2", + "port-version": 0 + }, { "git-tree": "60151223a49632b9d2513f0fc8e09fc49eaecf17", "version": "2.0.1", diff --git a/versions/v-/vcpkg-python-scripts.json b/versions/v-/vcpkg-python-scripts.json index 16060cef..b564989f 100644 --- a/versions/v-/vcpkg-python-scripts.json +++ b/versions/v-/vcpkg-python-scripts.json @@ -1,5 +1,15 @@ { "versions": [ + { + "git-tree": "32e165aee4edfa6dca2488a99ac0848fcf8b1664", + "version-date": "2024-05-12", + "port-version": 4 + }, + { + "git-tree": "fbb437d04db9dba8d06fe8d57c0fcbc6f538af75", + "version-date": "2024-05-12", + "port-version": 3 + }, { "git-tree": "affc5263ff69b940637952d599d1f08cc36b4949", "version-date": "2024-05-12",