File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed
Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ analysis_task:
8383 name : " SC Analysis"
8484 analysis_script :
8585 - poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests
86- - python -m venv . venv
86+ - uv venv
8787 - source .venv/bin/activate
88- - pip install .
88+ - uv pip install .
8989 - pysonar-scanner -Dsonar.organization=sonarsource -DbuildNumber=${CI_BUILD_NUMBER}
9090 always :
9191 pytest_artifacts :
Original file line number Diff line number Diff line change 11ARG CIRRUS_AWS_ACCOUNT=275878209202
22FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
3-
43USER root
5-
64ARG PYTHON_VERSION=3.12.1
75ENV POETRY_VERSION 2.0.1
86
9- # install required dependencies to build Python from source see: https://devguide.python.org/getting-started/setup-building/#install-dependencies
10- RUN apt-get update && apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
11- RUN curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz
12- RUN tar -xf Python-${PYTHON_VERSION}.tar.xz
13- RUN cd Python-${PYTHON_VERSION} && ./configure && make -s -j 4 && make altinstall
14- RUN cd /usr/local/bin \
15- && ln -s python${PYTHON_VERSION%.*} python \
16- && ln -s python${PYTHON_VERSION%.*} python3 \
17- && ln -s pip${PYTHON_VERSION%.*} pip \
18- && ln -s pip${PYTHON_VERSION%.*} pip3
19-
7+ RUN apt-get update && \
8+ apt-get install -y pipx \
9+ && rm -rf /var/lib/apt/lists/*
2010USER sonarsource
21-
22- RUN curl -sSL https://install.python-poetry.org | python3 -
23- ENV PATH= "${PATH}: /home/sonarsource/.local/bin"
24-
25- ENV SONARCLOUD_ANALYSIS true
11+ RUN pipx install uv
12+ ENV PATH=${PATH}:/home/sonarsource/.local/bin
13+ WORKDIR /home/sonarsource
14+ RUN uv python install ${PYTHON_VERSION} --default --preview && \
15+ uv tool install poetry==${POETRY_VERSION}
You can’t perform that action at this time.
0 commit comments