Skip to content

snap: fix s390x build of wheel-less Python dependencies#198

Merged
gboutry merged 1 commit into
canonical:mainfrom
MylesJP:fix/s390x-source-builds
Jun 24, 2026
Merged

snap: fix s390x build of wheel-less Python dependencies#198
gboutry merged 1 commit into
canonical:mainfrom
MylesJP:fix/s390x-source-builds

Conversation

@MylesJP

@MylesJP MylesJP commented Jun 24, 2026

Copy link
Copy Markdown

On architectures without published wheels (notably s390x), uv builds cryptography, markupsafe, msgpack and psutil from sdist. Two things broke those source builds:

  • Python.h was missing. uv creates its venv from this part's staged interpreter, so the headers must be in the staged Python tree; a python3-dev build-package does not reach it. Stage libpython3-dev.
  • cryptography 41.0.7's setuptools-rust backend imports pkg_resources, which setuptools >= 81 removed. uv sync ignores UV_BUILD_CONSTRAINT, so pin its build-time setuptools < 81 via [tool.uv.extra-build-dependencies], which uv sync honors.

Verified by a native s390x snapcraft build.

@MylesJP

MylesJP commented Jun 24, 2026

Copy link
Copy Markdown
Author

Confirmed that this builds on an s390x LPAR:

315940864 Jun 24 17:50 openstack-hypervisor_2026.1-3b0010a2_s390x.snap

@MylesJP
MylesJP requested a review from gboutry June 24, 2026 18:09

@gboutry gboutry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you reword your commit to replace co-authored-by with assisted-by, and add signed-off-by?

On architectures without published wheels (notably s390x), uv builds
cryptography, markupsafe, msgpack and psutil from sdist. Two things broke
those source builds:

- Python.h was missing. uv creates its venv from this part's *staged*
  interpreter, so the headers must be in the staged Python tree; a
  python3-dev build-package does not reach it. Stage libpython3-dev.
- cryptography 41.0.7's setuptools-rust backend imports pkg_resources,
  which setuptools >= 81 removed. uv sync ignores UV_BUILD_CONSTRAINT, so
  pin its build-time setuptools < 81 via [tool.uv.extra-build-dependencies],
  which uv sync honors.

Verified by a native s390x snapcraft build.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Myles Penner <myles.penner@canonical.com>
@MylesJP
MylesJP force-pushed the fix/s390x-source-builds branch from 494ce9a to b646059 Compare June 24, 2026 21:03
@MylesJP

MylesJP commented Jun 24, 2026

Copy link
Copy Markdown
Author

Can you reword your commit to replace co-authored-by with assisted-by, and add signed-off-by?

Thanks, done.

@gboutry gboutry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@gboutry
gboutry merged commit 226dcb0 into canonical:main Jun 24, 2026
3 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.

2 participants