Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests and add builddeps of python3-apt to Dockerfile #392

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ ENV DEBIAN_FRONTEND=noninteractive

ADD dependencies.apt.txt ./

RUN printf "deb-src http://deb.debian.org/debian bullseye main\ndeb-src http://deb.debian.org/debian-security/ bullseye-security main\ndeb-src http://deb.debian.org/debian bullseye-updates main" >> /etc/apt/sources.list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might try a patch to generate this based on the existing lines of /etc/apt/sources.list but this will work!


RUN apt-get update && \
xargs apt-get install --no-install-recommends -y < dependencies.apt.txt && \
apt-get --no-install-recommends -y build-dep python3-apt && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels a bit weird to install the build-deps from apt, but then install the package via pip. I guess that's fine because it makes the requirements.txt usable on non-Debian distros.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed it too, that pip modules are getting installed twice one by apt then by pip.

Not sure what to do there.

apt-get clean && \
rmdir /var/cache/apt/archives/partial

Expand Down
2 changes: 1 addition & 1 deletion tests/test_jsonchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def test_check(self):
self.assertNotEqual(data.current_version.url, data.new_version.url)
self.assertRegex(
data.new_version.url,
r"^https://github.com/stedolan/jq/releases/download/jq-[0-9\.\w]+/jq-[0-9\.\w]+\.tar.gz$",
r"^https://github.com/jqlang/jq/releases/download/jq-[0-9\.\w]+/jq-[0-9\.\w]+\.tar.gz$",
)
self.assertIsInstance(data.new_version.size, int)
self.assertGreater(data.new_version.size, 0)
Expand Down
Loading