2020# DD_TRACE_COMMIT Specific dd-trace-py commit SHA to build from GitHub.
2121# DD_TRACE_COMMIT_BRANCH dd-trace-py branch name to build from GitHub.
2222# DD_TRACE_WHEEL Path to a pre-built ddtrace .whl file.
23- # PIN_SETUPTOOLS Set to "true" to constrain setuptools<78 in Docker.
24- # Only needed for old dd-trace-py commits that import pkg_resources.
2523#
2624# Examples:
2725# # Build a single layer for Python 3.12 on arm64
@@ -94,21 +92,13 @@ replace_ddtrace_dep() {
9492}
9593
9694# Replace ddtrace source if necessary
97- DOCKER_BUILD_ARGS=" "
9895if [ -n " $DD_TRACE_COMMIT " ]; then
9996 replace_ddtrace_dep " ddtrace = { git = \" https://github.com/DataDog/dd-trace-py.git\" , rev = \" $DD_TRACE_COMMIT \" }"
10097elif [ -n " $DD_TRACE_COMMIT_BRANCH " ]; then
10198 replace_ddtrace_dep " ddtrace = { git = \" https://github.com/DataDog/dd-trace-py.git\" , branch = \" $DD_TRACE_COMMIT_BRANCH \" }"
10299elif [ -n " $DD_TRACE_WHEEL " ]; then
103100 replace_ddtrace_dep " ddtrace = { file = \" $DD_TRACE_WHEEL \" }"
104101fi
105-
106- # Older dd-trace-py commits import pkg_resources, which was removed in setuptools>=78.
107- # Set PIN_SETUPTOOLS=true to constrain setuptools<78 in pip's build isolation.
108- if [ -n " $PIN_SETUPTOOLS " ]; then
109- DOCKER_BUILD_ARGS=" --build-arg pin_setuptools=true"
110- fi
111-
112102function make_path_absolute {
113103 echo " $( cd " $( dirname " $1 " ) " ; pwd) /$( basename " $1 " ) "
114104}
@@ -127,7 +117,6 @@ function docker_build_zip {
127117 --build-arg runtime=python$1 \
128118 --platform linux/${arch} \
129119 --progress=plain \
130- $DOCKER_BUILD_ARGS \
131120 -o $temp_dir /python
132121
133122 # Zip to destination, and keep directory structure as based in $temp_dir
0 commit comments