File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ lint python:
6767 image: registry.ddbuild.io /images/mirror/python:{{ $runtime .image }}
6868 cache: &{{ $runtime .name }}-{{ $runtime .arch }}-cache
6969 before_script:
70- - PYTHON_VERSION= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} . /scripts/setup_python_env.sh
70+ - PYTHON_VERSION= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} IS_LINT = " 1 " . /scripts/setup_python_env.sh
7171 script:
7272 - source venv/bin/activate
7373 - . /scripts/check_format.sh
Original file line number Diff line number Diff line change 4545
4646set -e
4747
48- # Normalize Python version shorthand (e.g. 12 -> 3.12, 3.12 -> 3.12)
49- if [ -n " ${PYTHON_VERSION:- } " ]; then
50- if [[ " $PYTHON_VERSION " =~ ^[0-9]+$ ]]; then
51- PYTHON_VERSION=" 3.${PYTHON_VERSION} "
48+ if [ -z " ${IS_LINT:- } " ] || [ " ${IS_LINT} " = " 0" ] || [ " ${IS_LINT} " = " false" ]; then
49+ # Normalize Python version shorthand (e.g. 12 -> 3.12, 3.12 -> 3.12)
50+ if [ -n " ${PYTHON_VERSION:- } " ]; then
51+ if [[ " $PYTHON_VERSION " =~ ^[0-9]+$ ]]; then
52+ PYTHON_VERSION=" 3.${PYTHON_VERSION} "
53+ fi
5254 fi
53- fi
5455
55- # Backup pyproject.toml so the rewrite doesn't persist across runs (matters
56- # for local invocations; CI runners are ephemeral but cheap to be tidy).
57- cp pyproject.toml pyproject.toml.bak
58- cleanup () {
59- mv pyproject.toml.bak pyproject.toml 2> /dev/null || true
60- }
61- trap cleanup EXIT
56+ # Backup pyproject.toml so the rewrite doesn't persist across runs (matters
57+ # for local invocations; CI runners are ephemeral but cheap to be tidy).
58+ cp pyproject.toml pyproject.toml.bak
59+ cleanup () {
60+ mv pyproject.toml.bak pyproject.toml 2> /dev/null || true
61+ }
62+ trap cleanup EXIT
6263
63- source " $( dirname " $0 " ) /_spec_ddtrace_dep.sh"
64- spec_ddtrace_dep
64+ source " $( dirname " $0 " ) /_spec_ddtrace_dep.sh"
65+ spec_ddtrace_dep
66+ fi
6567
6668pip install virtualenv
6769virtualenv venv
You can’t perform that action at this time.
0 commit comments