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

poetry 1.7.1 #93

Merged
merged 4 commits into from
Nov 21, 2023
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: 1 addition & 1 deletion .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/) <br> [![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) |
Expand Down
11 changes: 10 additions & 1 deletion poetry/build_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand All @@ -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/"
Expand Down
11 changes: 10 additions & 1 deletion poetry/build_msvc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand All @@ -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/"
Expand Down
26 changes: 17 additions & 9 deletions poetry/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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() {
Expand All @@ -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.
Expand Down
14 changes: 11 additions & 3 deletions poetry/test_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)"
}
Expand All @@ -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.
Expand Down