Copilot commented on code in PR #3826:
URL: https://github.com/apache/avro/pull/3826#discussion_r3448059657
##########
share/docker/Dockerfile:
##########
@@ -178,46 +183,49 @@ RUN case "${BUILDARCH:?}" in \
&& for url in \
https://downloads.python.org/pypy/pypy3.11-v7.3.20-"$pypyarch".tar.bz2 \
https://downloads.python.org/pypy/pypy3.10-v7.3.19-"$pypyarch".tar.bz2 \
- ; do curl -fsSL "$url" | tar -xvjpf -; \
+ ; do curl -fsSL "$url" | tar -xjpf -; \
done \
&& ln -s pypy3.11* pypy3.11 && ln -s pypy3.10* pypy3.10
# Note: python3-distutils was removed with Python 3.12; see here for migration
advise: https://peps.python.org/pep-0632/#migration-advice
-RUN apt-get -qqy install --no-install-recommends mypy \
+RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
+ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
+ apt-get -qqy install --no-install-recommends mypy \
python3 \
python3.10 \
python3.11 \
python3.12 \
python3.13 \
python3.14 \
python3.14-dev \
- && apt-get -qqy clean \
- && curl -LsSf https://astral.sh/uv/0.10.4/install.sh | sh
+ && curl -LsSf https://astral.sh/uv/install.sh | sh
Review Comment:
Installing `uv` from an unpinned URL makes the Docker image non-reproducible
and can break builds when the upstream installer changes. Pin the installer to
a specific version (or introduce an `ARG UV_VERSION=` and use it in the URL).
##########
lang/py/pyproject.toml:
##########
@@ -56,6 +56,9 @@ zstandard = ["zstandard"]
[tool.ruff]
line-length = 150
+[tool.setuptools.packages.find]
+include = ["avro*"]
+
[tool.setuptools.package-data]
"avro" = [
"HandshakeRequest.avsc", "HandshakeResponse.avsc", "LICENSE.txt",
Review Comment:
`[tool.setuptools.package-data]` lists `LICENSE.txt`, but the repository
contains `lang/py/avro/LICENSE` (no `.txt`). With the updated `license-files`
pointing at `avro/LICENSE`, this package-data entry should match to ensure the
license is actually included in the built distribution.
##########
share/docker/Dockerfile:
##########
@@ -155,18 +162,16 @@ RUN apt-get -qqy install --no-install-recommends
libcompress-raw-zlib-perl \
libregexp-common-perl \
libtest-exception-perl \
libtest-pod-perl \
- libtry-tiny-perl \
- && apt-get -qqy clean
+ libtry-tiny-perl
-RUN curl -sSL https://cpanmin.us \
+RUN --mount=type=cache,target=/root/.cpanm \
+ curl -sSL https://cpanmin.us \
| perl - --self-upgrade \
&& cpanm --mirror https://www.cpan.org/ install Compress::Zstd \
- Module::Install::Repository \
- && rm -rf .cpanm
+ Module::Install::Repository
Review Comment:
`cpanm` doesn’t have an `install` subcommand; the literal `install` token
here will be treated as a module name and can cause the build to fail or do
unintended installs. Remove the `install` word and pass the module names
directly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]