From a7174f1eb088141ba35e6a1465546bdf518034d5 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 8 Apr 2024 11:51:34 +0100 Subject: [PATCH] Use python3 executable (#4157) Committed via https://github.com/asottile/all-repos --- .github/workflows/release.yml | 2 +- docs/ci.md | 4 ++-- docs/installation.md | 2 +- test/scenarios/verifier/.pre-commit-config.yaml | 2 +- tox.ini | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e45b02411..fa82f97d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,6 @@ jobs: with: fetch-depth: 0 # needed by setuptools-scm - name: Build dists - run: python -m tox -e pkg + run: python3 -m tox -e pkg - name: Publish to pypi.org uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/docs/ci.md b/docs/ci.md index e3294d828..8ccebdc61 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -197,10 +197,10 @@ steps: inputs: versionSpec: "3.10" - - script: python -m pip install "molecule[lint]" "python-vagrant" "molecule-vagrant" "ansible" + - script: python3 -m pip install "molecule[lint]" "python-vagrant" "molecule-vagrant" "ansible" displayName: Install dependencies - - script: python -m pip install "python-tss-sdk" + - script: python3 -m pip install "python-tss-sdk" displayName: Role-specific dependencies - script: | diff --git a/docs/installation.md b/docs/installation.md index c8d5b222b..2772fe285 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -93,7 +93,7 @@ $ python3 -m pip install --user "molecule-plugins[podman]" Installing molecule package also installed its main script `molecule`, usually in `PATH`. Users should know that molecule can also be called as -a python module, using `python -m molecule ...`. This alternative method +a python module, using `python3 -m molecule ...`. This alternative method has some benefits: - allows to explicitly control which Python interpreter is used by diff --git a/test/scenarios/verifier/.pre-commit-config.yaml b/test/scenarios/verifier/.pre-commit-config.yaml index ce9e96bd9..1c6652b9d 100644 --- a/test/scenarios/verifier/.pre-commit-config.yaml +++ b/test/scenarios/verifier/.pre-commit-config.yaml @@ -4,6 +4,6 @@ repos: hooks: - id: flake8 name: flake8 - entry: python -m flake8 --max-line-length=120 + entry: python3 -m flake8 --max-line-length=120 language: system types: [python] diff --git a/tox.ini b/tox.ini index 7e5a7497e..718ab593e 100644 --- a/tox.ini +++ b/tox.ini @@ -55,7 +55,7 @@ commands = # failsafe as pip may install incompatible dependencies pip check # failsafe for preventing changes that may break pytest collection - sh -c "PYTEST_ADDOPTS= python -m pytest -p no:cov --collect-only >>/dev/null" + sh -c "PYTEST_ADDOPTS= python3 -m pytest -p no:cov --collect-only >>/dev/null" sh -c "rm -f .tox/.coverage.*" # html report is used by Zuul CI to display reports coverage run -m pytest {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs} @@ -71,7 +71,7 @@ description = Runs all linting tasks basepython = python3.10 commands = # to run a single linter you can do "pre-commit run flake8" - python -m pre_commit run {posargs:--all --show-diff-on-failure} + python3 -m pre_commit run {posargs:--all --show-diff-on-failure} deps = pre-commit>=2.21.0 check-jsonschema>=0.20.0 @@ -105,11 +105,11 @@ deps = setenv = commands = rm -rfv {toxinidir}/dist/ - python -m build \ + python3 -m build \ --outdir {toxinidir}/dist/ \ {toxinidir} # metadata validation - sh -c "python -m twine check --strict {toxinidir}/dist/*" + sh -c "python3 -m twine check --strict {toxinidir}/dist/*" [testenv:snap] description = Builds a snap package