Skip to content

Commit f028e8e

Browse files
committed
remove the pin_setuptools option entirely
1 parent ef104fb commit f028e8e

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

Dockerfile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,6 @@ ENV PATH=/root/.cargo/bin:$PATH
2626
# Install datadog_lambda and dependencies from local
2727
COPY . .
2828

29-
# When building dd-trace-py from source (older commits), setuptools<78 is needed
30-
# in pip's build isolation environment so that pkg_resources is available.
31-
# An empty constraints file is a no-op for pip.
32-
ARG pin_setuptools=""
33-
RUN if [ -n "$pin_setuptools" ]; then \
34-
echo 'setuptools<78' > /tmp/build-constraints.txt; \
35-
else \
36-
touch /tmp/build-constraints.txt; \
37-
fi
38-
ENV PIP_CONSTRAINT=/tmp/build-constraints.txt
39-
4029
RUN pip install --no-cache-dir . -t ./python/lib/$runtime/site-packages
4130

4231
# Remove botocore (40MB) to reduce package size. aws-xray-sdk

scripts/build_layers.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
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=""
9895
if [ -n "$DD_TRACE_COMMIT" ]; then
9996
replace_ddtrace_dep "ddtrace = { git = \"https://github.com/DataDog/dd-trace-py.git\", rev = \"$DD_TRACE_COMMIT\" }"
10097
elif [ -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\" }"
10299
elif [ -n "$DD_TRACE_WHEEL" ]; then
103100
replace_ddtrace_dep "ddtrace = { file = \"$DD_TRACE_WHEEL\" }"
104101
fi
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-
112102
function 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

Comments
 (0)