[Git][NTPsec/ntpsec][master] ci: detect Python version dynamically in ubuntu-devel job

Matt Selsky (@selsky) gitlab at mg.gitlab.com
Wed Jul 1 02:20:10 UTC 2026



Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
120c3ea2 by Mark Atwood at 2026-06-30T16:30:28-07:00
ci: detect Python version dynamically in ubuntu-devel job

The hardcoded python3.9 breaks when ubuntu:devel updates to a new
Python version. Query the actual version at runtime instead.

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -200,7 +200,8 @@ ubuntu-devel-basic:
   allow_failure: true
   image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
   script:
-    - echo /usr/local/lib/python3.9/site-packages/ > /usr/lib/python3/dist-packages/ntpsec.pth
+    - PYVER=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
+    - echo /usr/local/lib/python${PYVER}/site-packages/ > /usr/lib/python3/dist-packages/ntpsec.pth
     - python3 ./waf configure --enable-warnings --enable-Werror --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
     - python3 ./waf install
     - python3 ./waf uninstall



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/120c3ea2af686407c01425545b28de60485b8ca2

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/120c3ea2af686407c01425545b28de60485b8ca2
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20260701/07ab710f/attachment.htm>


More information about the vc mailing list