From 61ec0ebd238adc1c58a8a73841e4488a37e053d6 Mon Sep 17 00:00:00 2001 From: Marcin Raba Date: Tue, 26 Nov 2024 13:21:01 +0100 Subject: [PATCH] Snow 1790301 linux build fix (#1900) * SNOW-1790301: downgrade python to 3.10 --- RELEASE-NOTES.md | 1 + pyproject.toml | 2 +- scripts/packaging/Dockerfile | 17 ++++++++--------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 10fb003577..b5f3ccff40 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -21,6 +21,7 @@ ## New additions ## Fixes and improvements +* Fixed crashes with older x86_64 Intel CPUs. # v3.2.0 diff --git a/pyproject.toml b/pyproject.toml index c5820716ae..7384198965 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,7 +100,7 @@ test-cov = [ legacy-pypi-build = [".compat/build_snowflake-cli-labs.sh"] [tool.hatch.envs.packaging] -python = "3.11" +python = "3.10" features = ["development", "packaging"] [tool.hatch.envs.packaging.scripts] diff --git a/scripts/packaging/Dockerfile b/scripts/packaging/Dockerfile index 4a4f64d3fc..377b120035 100644 --- a/scripts/packaging/Dockerfile +++ b/scripts/packaging/Dockerfile @@ -28,17 +28,16 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y tk-dev RUN gem install dotenv -v 2.8.1 RUN gem install fpm -RUN curl https://pyenv.run | bash -RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -RUN echo 'export PATH=$PYENV_ROOT/bin:$PATH' >> ~/.bashrc -RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc +ENV PYENV_ROOT="${HOME}/.pyenv" +ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:$PATH" +ENV PYTHON_VERSION=3.10 -ENV PYENV_ROOT=$HOME/.pyenv -ENV PATH=$PYENV_ROOT/bin:$PATH -RUN eval "$(pyenv init -)" -RUN pyenv install 3.10 -RUN pyenv global 3.10 +RUN curl https://pyenv.run | bash +RUN pyenv install ${PYTHON_VERSION} +RUN pyenv rehash +RUN pyenv global ${PYTHON_VERSION} RUN pyenv versions +RUN pyenv rehash RUN pyenv exec pip install -U pip uv hatch WORKDIR /snowflake-cli