diff --git a/.github/workflows/.tests-matrix.yaml b/.github/workflows/.tests-matrix.yaml index 9a9bae65d01..87718ee886c 100644 --- a/.github/workflows/.tests-matrix.yaml +++ b/.github/workflows/.tests-matrix.yaml @@ -78,25 +78,41 @@ jobs: if: inputs.run-pytest-export steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - - uses: ./.github/actions/bootstrap-poetry with: - python-version: ${{ inputs.python-version }} + path: poetry - - uses: ./.github/actions/poetry-install + - uses: ./poetry/.github/actions/bootstrap-poetry with: - args: --with github-actions + python-version: ${{ inputs.python-version }} - - run: poetry run pip list --format json | jq -r '.[] | "\(.name)=\(.version)"' >> $GITHUB_OUTPUT - id: package-versions + - name: Get poetry-plugin-export version + run: | + PLUGIN_VERSION=$(curl -s https://pypi.org/pypi/poetry-plugin-export/json | jq -r ".info.version") + echo "Found version ${PLUGIN_VERSION}" + echo version=${PLUGIN_VERSION} >> $GITHUB_OUTPUT + id: poetry-plugin-export-version - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - name: Check out poetry-plugin-export + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: path: poetry-plugin-export repository: python-poetry/poetry-plugin-export - ref: refs/tags/${{ steps.package-versions.outputs.poetry-plugin-export }} + ref: refs/tags/${{ steps.poetry-plugin-export-version.outputs.version }} + + - name: Use local poetry + working-directory: poetry-plugin-export + run: poetry add --lock --group dev ../poetry + + - name: Install + working-directory: poetry-plugin-export + run: poetry install - - run: poetry run -C .. pytest -v - working-directory: ./poetry-plugin-export + - name: Run tests + working-directory: poetry-plugin-export + run: poetry run python -m pytest -p no:sugar -q tests - - run: git -C poetry-plugin-export diff --exit-code --stat HEAD + - name: Check for clean working tree + working-directory: poetry-plugin-export + run: | + git checkout -- pyproject.toml poetry.lock + git diff --exit-code --stat HEAD diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 6d060fa1cf7..bdacdbdf659 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -14,15 +14,6 @@ pass_filenames: false files: ^(.*/)?(poetry\.lock|pyproject\.toml)$ -- id: poetry-export - name: poetry-export - description: run poetry export to sync lock file with requirements.txt - entry: poetry export - language: python - pass_filenames: false - files: ^(.*/)?poetry\.lock$ - args: ["-f", "requirements.txt", "-o", "requirements.txt"] - - id: poetry-install name: poetry-install description: run poetry install to install dependencies from the lock file diff --git a/poetry.lock b/poetry.lock index 4e99899317c..484af427d5f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -989,21 +989,6 @@ url = "https://github.com/python-poetry/poetry-core.git" reference = "main" resolved_reference = "beb93b1aba6ad47667c05721a74c8f3961402046" -[[package]] -name = "poetry-plugin-export" -version = "1.8.0" -description = "Poetry plugin to export the dependencies to various formats" -optional = false -python-versions = "<4.0,>=3.8" -files = [ - {file = "poetry_plugin_export-1.8.0-py3-none-any.whl", hash = "sha256:adbe232cfa0cc04991ea3680c865cf748bff27593b9abcb1f35fb50ed7ba2c22"}, - {file = "poetry_plugin_export-1.8.0.tar.gz", hash = "sha256:1fa6168a85d59395d835ca564bc19862a7c76061e60c3e7dfaec70d50937fc61"}, -] - -[package.dependencies] -poetry = ">=1.8.0,<3.0.0" -poetry-core = ">=1.7.0,<3.0.0" - [[package]] name = "pre-commit" version = "3.5.0" @@ -1027,7 +1012,7 @@ name = "psutil" version = "6.0.0" description = "Cross-platform lib for process and system monitoring in Python." optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ {file = "psutil-6.0.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6"}, {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0"}, @@ -1630,4 +1615,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "816bcb3532fd7484005946146373ddb848e7405a72f10a8dc345b9e4596427f7" +content-hash = "441837efd1e7f3926ede309d5d5f71a7b25d86ca01a91e96afe0ae63851bfbb8" diff --git a/pyproject.toml b/pyproject.toml index 30cbc165f93..30d4c958623 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,6 @@ Changelog = "https://python-poetry.org/history/" python = "^3.8" poetry-core = { git = "https://github.com/python-poetry/poetry-core.git", branch = "main" } -poetry-plugin-export = "^1.8.0" build = "^1.2.1" cachecontrol = { version = "^0.14.0", extras = ["filecache"] } cleo = "^2.1.0"