Skip to content

Conversation

@gkreitz
Copy link
Contributor

@gkreitz gkreitz commented Apr 24, 2025

This PR changes how we package problemtools, to allow us to add pip dependencies without waiting for Ubuntu to package them.

Key changes:

  • Build the deb package using dh_virtualenv (we now install to /opt/venvs/kattis-problemtools/ and add symlinks from /usr/bin for our tools)
  • Clean up python packaging to use the more modern pyproject.toml. We still need to keep setup.py to fetch and build our support tools.
  • Pull version information from git using setuptools-scm (this yields a string which is very similar to our old versioning)
  • Stop exposing problemtools.__version__. That PEP failed and was replaced by importlib.metadata.version
  • Split CI/CD into two separate jobs. Python unit tests now run in parallel with deb building, and deb building only happens once (I don't see a need to test deb building using both pypy and python3)

Fixes #297

gkreitz added 5 commits April 22, 2025 10:22
We now package our debian package in a virtualenv, together with our
dependencies, to allow us to just use normal pip dependencies instead of
waiting for Ubuntu/Debian to package python dependencies for us. This
means we now also list our requirements in requirements.txt.

This change also bumped debian compat level to the most recent stable
version, getting rid of deprecation warnings.
@gkreitz gkreitz force-pushed the 297_modernize_build branch 4 times, most recently from 5b946a5 to dc24947 Compare April 24, 2025 13:58
gkreitz added 6 commits April 24, 2025 16:21
I could not come up with a good way to reliably make an editable install
to work in setuptools in a way that kept our support tooling available.

This reverts my earlier change of the README where I intended us to move
to using an editable install for development work, and instead just
updates our wrapper scripts to make use of a venv to pull in the correct
dependencies.
This should make things a bit quicker (we can start with python tests
without waiting for a ton of apt dependencies) and cheaper (we don't
build deb twice).

It also seems like *something* confuses dh_virtualenv, I'm starting to
suspect actions/setup-python.
@gkreitz gkreitz force-pushed the 297_modernize_build branch from dc24947 to d99b67e Compare April 24, 2025 14:21
@gkreitz gkreitz merged commit 5355115 into Kattis:develop Apr 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update/rethink packaging of problemtools.

2 participants