Skip to content

fix(sdk): make Python SDK installable via pip/uv - #12

Merged
alainrk merged 1 commit into
mainfrom
fix/python-sdk-license-metadata
May 27, 2026
Merged

alainrk merged 1 commit into
mainfrom
fix/python-sdk-license-metadata

Conversation

@alainrk

@alainrk alainrk commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • The generated sdks/python/pyproject.toml shipped license = "NoLicense". As a bare string, setuptools validates project.license as an SPDX expression — "NoLicense" isn't valid SPDX, so setuptools (≥77) rejects it ("0 matches"), and the table forms aren't matched either. This breaks pip install git+... and uv add from this repo.
  • Switched to the table form license = { text = "NoLicense" }, which builds cleanly (verified with uv build --wheel).
  • Added a post-generation sed in the sdk-python Make target (mirroring the existing Go module-path rewrite) so the fix survives the next openapi-generator run.

Why this matters

Consumers importing the SDK via uv currently can't install it at all — the build fails during metadata validation before any code is touched.

Test plan

  • cd sdks/python && uv build --wheel succeeds
  • uv add "cashout-sdk @ git+https://github.com/alainrk/cashout.git#subdirectory=sdks/python" resolves in a downstream project
  • make sdk-python regenerates and the license line remains in table form

🤖 Generated with Claude Code

The generated sdks/python/pyproject.toml declared `license = "NoLicense"`.
As a bare string, setuptools validates project.license as an SPDX
expression; "NoLicense" is not valid SPDX, so setuptools (>=77) rejects it
and the table forms aren't matched either, breaking `pip install` / `uv add`
from git. Switch to the table form `license = { text = "NoLicense" }`, which
builds cleanly, and add a post-generation sed in the sdk-python Make target
so the fix survives the next openapi-generator run.

Also unblock CI: gofmt the previously unformatted internal/db and sdks/go
files, and drop an unused `assertFilter` field in TestBuildSearchFilter that
tripped golangci-lint's `unused` check.
@alainrk
alainrk force-pushed the fix/python-sdk-license-metadata branch from c8be129 to 7ac04d4 Compare May 27, 2026 03:52
@alainrk
alainrk merged commit 2dbee7e into main May 27, 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.

1 participant