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

Use jq's IN() instead of index() #982

Merged
merged 1 commit into from
Oct 16, 2024
Merged
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
6 changes: 3 additions & 3 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FROM buildpack-deps:{{ env.variant }}
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH

{{ if [ "3.9", "3.10", "3.11", "3.12" ] | index(rcVersion) then ( -}}
{{ if rcVersion | IN("3.9", "3.10", "3.11", "3.12") then ( -}}
{{ # only set LANG on versions less than 3.13 -}}
# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed
# last attempted removal of LANG broke many users:
Expand Down Expand Up @@ -174,7 +174,7 @@ RUN set -eux; \
{{
# skip optimizations on alpine on riscv64 (except python 3.9)
# only 3.9 completes building on riscv64 with optimizations, 3.10-3.13 all hit the 3 hour limit
if (is_alpine | not) or ( [ "3.9" ] | index(rcVersion) ) then (
if (is_alpine | not) or rcVersion == "3.9" then (
-}}
--enable-optimizations \
{{ ) else ( -}}
Expand All @@ -184,7 +184,7 @@ RUN set -eux; \
--enable-shared \
{{
# <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance
if [ "3.9" ] | index(rcVersion) then "" else (
if rcVersion == "3.9" then "" else (
-}}
--with-lto \
{{ ) end -}}
Expand Down
Loading