Skip to content

Commit

Permalink
Merge pull request dependabot#7611 from dependabot/remove-leftover-bu…
Browse files Browse the repository at this point in the history
…ild-script

Delete leftover build script
  • Loading branch information
jeffwidman authored Jul 25, 2023
2 parents 21bc63a + 67ca926 commit d4f3607
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 34 deletions.
10 changes: 5 additions & 5 deletions python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ RUN git -c advice.detachedHead=false clone https://github.com/pyenv/pyenv.git --

FROM python-core as python-3.10
RUN pyenv install $PY_3_10 \
&& bash /opt/python/helpers/build_for_version $PY_3_10 \
&& bash /opt/python/helpers/build $PY_3_10 \
&& cd /usr/local/.pyenv \
&& tar czf 3.10.tar.gz versions/$PY_3_10

FROM python-core as python-3.9
RUN pyenv install $PY_3_9 \
&& bash /opt/python/helpers/build_for_version $PY_3_9 \
&& bash /opt/python/helpers/build $PY_3_9 \
&& cd /usr/local/.pyenv \
&& tar czf 3.9.tar.gz versions/$PY_3_9

FROM python-core as python-3.8
RUN pyenv install $PY_3_8 \
&& bash /opt/python/helpers/build_for_version $PY_3_8 \
&& bash /opt/python/helpers/build $PY_3_8 \
&& cd /usr/local/.pyenv \
&& tar czf 3.8.tar.gz versions/$PY_3_8

FROM python-core as python-3.7
RUN pyenv install $PY_3_7 \
&& bash /opt/python/helpers/build_for_version $PY_3_7 \
&& bash /opt/python/helpers/build $PY_3_7 \
&& cd /usr/local/.pyenv \
&& tar czf 3.7.tar.gz versions/$PY_3_7

Expand Down Expand Up @@ -125,7 +125,7 @@ ENV DEPENDABOT_NATIVE_HELPERS_PATH="/opt"
RUN git -c advice.detachedHead=false clone https://github.com/pyenv/pyenv.git --branch $PYENV_VERSION --single-branch --depth=1 /usr/local/.pyenv
RUN pyenv install $PY_3_11 \
&& pyenv global $PY_3_11 \
&& bash /opt/python/helpers/build_for_version $PY_3_11
&& bash /opt/python/helpers/build $PY_3_11

COPY --from=python-3.10 /usr/local/.pyenv/3.10.tar.gz /usr/local/.pyenv/3.10.tar.gz
COPY --from=python-3.9 /usr/local/.pyenv/3.9.tar.gz /usr/local/.pyenv/3.9.tar.gz
Expand Down
5 changes: 2 additions & 3 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ We rely on `pyenv` to manage Python's versions.
Updating the list of known versions might be tricky, here are the steps:
1. Update `pyenv` version in our [`Dockerfile`](https://github.com/dependabot/dependabot-core/blob/main/Dockerfile), you may use commit hash if new `pyenv` version is not released yet
2. Then, update `pyenv global` version in `Dockerfile`, we always use the latest (and the greatest) Python version there is
3. The next step is to update our [`build`](https://github.com/dependabot/dependabot-core/blob/main/python/helpers/build) script, bump the latest Python version there
4. Now, update the list of known Python version in [`python_versions.rb`](https://github.com/dependabot/dependabot-core/blob/main/python/lib/dependabot/python/python_versions.rb)
5. The last step is to tweak our tests, if required. The easiest way to determine which one to tweak is just by analyzing the failing output
3. Now, update the list of known Python version in [`python_versions.rb`](https://github.com/dependabot/dependabot-core/blob/main/python/lib/dependabot/python/python_versions.rb)
4. The last step is to tweak our tests, if required. The easiest way to determine which one to tweak is just by analyzing the failing output

[Example PR](https://github.com/dependabot/dependabot-core/pull/3440) that does all these things.

Expand Down
6 changes: 1 addition & 5 deletions python/helpers/build
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ cp -r \
"$install_dir"

cd "$install_dir"
PYENV_VERSION=3.11.4 pyenv exec pip --disable-pip-version-check install --use-pep517 -r "requirements.txt"
PYENV_VERSION=3.10.12 pyenv exec pip --disable-pip-version-check install --use-pep517 -r "requirements.txt"
PYENV_VERSION=3.9.17 pyenv exec pip --disable-pip-version-check install --use-pep517 -r "requirements.txt"
PYENV_VERSION=3.8.17 pyenv exec pip --disable-pip-version-check install --use-pep517 -r "requirements.txt"
PYENV_VERSION=3.7.17 pyenv exec pip --disable-pip-version-check install --use-pep517 -r "requirements.txt"
PYENV_VERSION=$1 pyenv exec pip --disable-pip-version-check install --use-pep517 -r "requirements.txt"
21 changes: 0 additions & 21 deletions python/helpers/build_for_version

This file was deleted.

0 comments on commit d4f3607

Please sign in to comment.