diff --git a/.github/workflows/poetry.yml b/.github/workflows/poetry.yml index 8d9d1a58c..217282d05 100644 --- a/.github/workflows/poetry.yml +++ b/.github/workflows/poetry.yml @@ -42,7 +42,7 @@ jobs: uses: ./.github/workflows/release.yml with: workflow: ${{ github.workflow }} - tool_version: '1.5.1' + tool_version: '1.7.1' prepare_body: | bsdtar -Oxf ./build-gnu/build-gnu.tar.gz build-gnu.md >> body.md bsdtar -Oxf ./build-msvc/build-msvc.tar.gz build-msvc.md >> body.md diff --git a/README.md b/README.md index b1074215a..55f566e74 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | releases | latest source | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/python-3.11.3/total?label=⭳%20python-3.11.3)](https://github.com/hemnstill/StandaloneTools/releases/tag/python-3.11.3) | [![GitHub Repo stars](https://img.shields.io/github/stars/indygreg/python-build-standalone?style=social&label=python-build-standalone)](https://github.com/indygreg/python-build-standalone) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/indygreg/python-build-standalone)](https://python-build-standalone.readthedocs.io/en/latest/)
[![GitHub Repo stars](https://img.shields.io/github/stars/python/cpython?style=social&label=python)](https://github.com/python/cpython) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python/cpython)](https://docs.python.org/3/) | -| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/poetry-1.5.1/total?label=⭳%20poetry-1.5.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/poetry-1.5.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/python-poetry/poetry?style=social&label=poetry)](https://github.com/python-poetry/poetry) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python-poetry/poetry)](https://python-poetry.org/docs/) | +| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/poetry-1.7.1/total?label=⭳%20poetry-1.7.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/poetry-1.7.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/python-poetry/poetry?style=social&label=poetry)](https://github.com/python-poetry/poetry) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python-poetry/poetry)](https://python-poetry.org/history/) | | [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pylint-2.17.4/total?label=⭳%20pylint-2.17.4)](https://github.com/hemnstill/StandaloneTools/releases/tag/pylint-2.17.4) | [![GitHub Repo stars](https://img.shields.io/github/stars/PyCQA/pylint?style=social&label=pylint)](https://github.com/PyCQA/pylint) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/PyCQA/pylint)](https://pylint.pycqa.org/en/latest/) | | [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/mypy-1.4.1/total?label=⭳%20mypy-1.4.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/mypy-1.4.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/python/mypy?style=social&label=mypy)](https://github.com/python/mypy) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python/mypy)](https://mypy.readthedocs.io/en/latest/) | | [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/ansible-8.3.0/total?label=⭳%20ansible-8.3.0-core-2.15.3)](https://github.com/hemnstill/StandaloneTools/releases/tag/ansible-8.3.0) | [![GitHub Repo stars](https://img.shields.io/github/stars/ansible/ansible?style=social&label=ansible)](https://github.com/ansible/ansible) [![PyPI](https://img.shields.io/pypi/v/ansible)](https://pypi.org/project/ansible/) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/ansible/ansible)](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) | diff --git a/poetry/build_gnu.sh b/poetry/build_gnu.sh index e9c9c9a14..173f0c2d4 100755 --- a/poetry/build_gnu.sh +++ b/poetry/build_gnu.sh @@ -6,7 +6,7 @@ apt update apt install -y wget binutils tool_name="poetry" -tool_version="1.5.1" +tool_version="1.7.1" python_self_name="python-3.11.3" python_release_date="20230507" self_name="$tool_name-$tool_version" @@ -17,6 +17,9 @@ mkdir -p "$release_version_dirpath" && cd "$dp0/release" echo "download python install script ..." python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$python_self_name/$self_toolset_name.tar.gz" + +echo "::group::prepare sources $python_bin_download_url" + python_download_zip="$dp0/release/$python_self_name.tar.gz" [[ ! -f "$python_download_zip" ]] && wget "$python_bin_download_url" -O "$python_download_zip" @@ -33,11 +36,17 @@ cpython_bin="$release_version_dirpath/Scripts/bin/python3" "$bsdtar" -xf "$python_include_download_zip" "python/install/include" cp -rf "python/install/include" "$release_version_dirpath/Scripts/include/" +echo "::endgroup::" + +echo "::group::build" + echo "install poetry ..." "$cpython_bin" -m pip install "poetry==$tool_version" "$cpython_bin" -m poetry self add poetry-plugin-sort "$cpython_bin" -m poetry self lock +echo "::endgroup::" + echo "prepare build artifacts ..." cp -f "$dp0/release/poetry.sh" "$release_version_dirpath/" diff --git a/poetry/build_msvc.sh b/poetry/build_msvc.sh index b735ce1f5..42d3dc6d5 100755 --- a/poetry/build_msvc.sh +++ b/poetry/build_msvc.sh @@ -3,7 +3,7 @@ dp0="$(realpath "$(dirname "$0")")" set -e tool_name="poetry" -tool_version="1.5.1" +tool_version="1.7.1" python_self_name="python-3.11.3" self_name="$tool_name-$tool_version" self_toolset_name="build-msvc" @@ -13,6 +13,9 @@ mkdir -p "$release_version_dirpath" && cd "$dp0/release" echo "download python install script ..." python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$python_self_name/$self_toolset_name.tar.gz" + +echo "::group::prepare sources $python_bin_download_url" + python_download_zip="$dp0/release/$python_self_name.tar.gz" [[ ! -f "$python_download_zip" ]] && wget "$python_bin_download_url" -O "$python_download_zip" @@ -22,12 +25,18 @@ bsdtar="$dp0/release/bsdtar" cpython_bin="$release_version_dirpath/Scripts/python.exe" [[ ! -f "$cpython_bin" ]] && tar -xf "$python_download_zip" -C "$release_version_dirpath" +echo "::endgroup::" + +echo "::group::build" + echo "install poetry ..." "$cpython_bin" -m pip install poetry=="$tool_version" "$cpython_bin" -m poetry self add poetry-plugin-sort "$cpython_bin" -m poetry self lock +echo "::endgroup::" + echo "prepare build artifacts ..." cp -f "$dp0/release/poetry.bat" "$release_version_dirpath/" cp -f "$dp0/release/__main__poetry.py" "$release_version_dirpath/" diff --git a/poetry/test_linux.sh b/poetry/test_linux.sh index f04bea64e..1cd274e13 100755 --- a/poetry/test_linux.sh +++ b/poetry/test_linux.sh @@ -7,6 +7,8 @@ if [[ $is_ubuntu_os == true ]]; then apt install -y clang libmysqlclient-dev fi +readme_content='test readme content' + pyproject_content=' [tool.poetry] name = "StandaloneTools" @@ -30,17 +32,17 @@ Resolving dependencies... Package operations: 6 installs, 0 updates, 0 removals - • Installing certifi (2023.5.7) - • Installing charset-normalizer (3.1.0) + • Installing certifi (2023.11.17) + • Installing charset-normalizer (3.3.2) • Installing idna (3.4) - • Installing urllib3 (1.26.16) + • Installing urllib3 (1.26.18) • Installing mysqlclient (2.1.1) • Installing requests (2.28.2) Writing lock file' test_version() { - assertEquals "Poetry (version 1.5.1)" "$(../bin/poetry.sh --version)" + assertEquals "Poetry (version 1.7.1)" "$(../bin/poetry.sh --version)" } test_version_plugins() { @@ -51,30 +53,36 @@ test_version_plugins() { Dependencies - poetry (>=1.2.0,<2.0.0) - • poetry-plugin-export (1.4.0) Poetry plugin to export the dependencies to various formats + • poetry-plugin-export (1.6.0) Poetry plugin to export the dependencies to various formats 1 application plugin Dependencies - - poetry (>=1.5.0,<2.0.0) - - poetry-core (>=1.6.0,<2.0.0)" "$(../bin/poetry.sh self show plugins)" + - poetry (>=1.6.0,<2.0.0) + - poetry-core (>=1.7.0,<2.0.0)" "$(../bin/poetry.sh self show plugins)" } test_install_from_symlink() { { printf '%s' "$pyproject_content" } > pyproject.toml + { printf '%s' "$readme_content" + } > README.md + ln -sf "$(readlink -f ../bin/poetry.sh)" /usr/local/bin/poetry - assertEquals "$poetry_install_stdout" "$(poetry install)" + assertEquals "$poetry_install_stdout" "$(poetry install --no-root)" } test_install_from_sh() { { printf '%s' "$pyproject_content" } > pyproject.toml + { printf '%s' "$readme_content" + } > README.md + assertEquals "Installing dependencies from lock file -No dependencies to install or update" "$(../bin/poetry.sh install)" +No dependencies to install or update" "$(../bin/poetry.sh install --no-root)" } # Load and run shUnit2. diff --git a/poetry/test_windows.sh b/poetry/test_windows.sh index 86e37525d..a2c631795 100755 --- a/poetry/test_windows.sh +++ b/poetry/test_windows.sh @@ -3,6 +3,8 @@ is_windows_os=false && [[ $(uname) == Windows_NT* ]] && is_windows_os=true is_nanoserver_os=false && $is_windows_os && [[ ! -f "C:\Windows\notepad.exe" ]] && is_nanoserver_os=true +readme_content='test readme content' + pyproject_content=' [tool.poetry] name = "StandaloneTools" @@ -28,17 +30,20 @@ Package operations: 6 installs, 0 updates, 0 removals ' test_version() { - assertEquals "Poetry (version 1.5.1)" "$(../bin/poetry.bat --version)" + assertEquals "Poetry (version 1.7.1)" "$(../bin/poetry.bat --version)" } test_install_from_path() { { printf '%s' "$pyproject_content" } > pyproject.toml + { printf '%s' "$readme_content" + } > README.md + path_with_poetry="$PATH;$(readlink -f ../bin)" export PATH="$path_with_poetry" - poetry_install_stdout="$(poetry install | dos2unix)" + poetry_install_stdout="$(poetry install --no-root | dos2unix)" assertEquals "$(echo "$poetry_install_stdout_etalon" | head -4)" "$(echo "$poetry_install_stdout" | head -4)" } @@ -47,9 +52,12 @@ test_install_from_bat() { { printf '%s' "$pyproject_content" } > pyproject.toml + { printf '%s' "$readme_content" + } > README.md + assertEquals "Installing dependencies from lock file -No dependencies to install or update" "$(../bin/poetry.bat install | dos2unix)" +No dependencies to install or update" "$(../bin/poetry.bat install --no-root | dos2unix)" } # Load and run shUnit2.