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

feat(24.04): add python3 slice #387

Open
wants to merge 2 commits into
base: ubuntu-24.04
Choose a base branch
from
Open
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
25 changes: 25 additions & 0 deletions slices/python3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package: python3

essential:
- python3_copyright

slices:
Copy link

@clay-lake clay-lake Nov 11, 2024

Choose a reason for hiding this comment

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

Should we modify or add a slice to link python3.12 to python3 and possibly python? Previously we would let the user link these, but If the user is simply including the python3 slice, it may prevent some confusion when migrating between python versions in different releases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A link from python to python3.12 is not created by the postinst script of python3 package, so I didn't include that in this slice. Besides, linking python3 to a specific python3.x version will cause conflicts when there are multiple python3.x packages in the same release (e.g. python3.10 and python3.11 in 22.04).

core:
essential:
- python3.12_core

standard:
essential:
- python3.12_standard

utils:
essential:
- python3.12_utils
contents:
/usr/bin/pdb3:

Choose a reason for hiding this comment

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

Do these files need to be symlinked to their python 3.12 alternatives in python3.12_utils?
ex. /usr/bin/pdb3 -> /usr/bin/pdb3.12

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are already symlinks when installed from python3 package, and they are linked properly (pdb3 linked to pdb3.12, etc).

/usr/bin/pydoc3:
/usr/bin/pygettext3:

copyright:
contents:
/usr/share/doc/python3/copyright:
14 changes: 14 additions & 0 deletions tests/spread/integration/python3/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
summary: Integration tests for Python3

environment:
SLICE/core: "core"
SLICE/standard: "standard"

execute: |
# Test different slice installations
echo "SLICE=${SLICE}"

rootfs="$(install-slices python3_${SLICE})"

cp ../python3.12/test_${SLICE}.py "${rootfs}/"
chroot "$rootfs" python3.12 /test_${SLICE}.py
Loading