Skip to content

build: migrate from pip to uv#32

Merged
thunderbiscuit merged 3 commits intobitcoindevkit:masterfrom
brenorb:build/migrate-pip-to-uv
Feb 19, 2026
Merged

build: migrate from pip to uv#32
thunderbiscuit merged 3 commits intobitcoindevkit:masterfrom
brenorb:build/migrate-pip-to-uv

Conversation

@brenorb
Copy link
Contributor

@brenorb brenorb commented Feb 17, 2026

Description

Migrate the repo from pip/build-based workflows to uv:

  • CI/build/test workflows now use astral-sh/setup-uv + uv build / uv pip install / uvx
  • Dev tooling deps are defined in pyproject.toml dependency groups; requirements.txt and requirements-dev.txt are removed
  • uv.lock is committed; docs CI uses uv sync --frozen --group dev for reproducible builds
  • scripts/generate-* no longer install Python deps (generation is Rust-side; build happens via uv build)
  • Closes Update scripts to use uv #26
  • Supersedes chore: Prefer uv over pip for dependencies #29

Notes to the reviewers

  • We intentionally keep PyPI publishing via pypa/gh-action-pypi-publish@release/v1 to avoid changing release semantics beyond the pip→uv migration.
  • We intentionally don’t pass --outdir dist: uv build outputs to dist/ by default.
  • Publishing remains via pypa/gh-action-pypi-publish@release/v1 to avoid changing:
    • artifact download layout expectations,
    • GitHub environment/permissions semantics,
    • and publish behavior beyond the pip→uv migration.

Tests run locally:

  • uv sync --frozen --group dev
  • uv run python -m unittest discover --start-directory ./tests --pattern "test_offline_*.py" --verbose
  • uv build --wheel -v

Changelog notice

Build/CI: migrate from pip to uv for packaging and dependency management.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • [-] I ran cargo fmt and cargo clippy before committing

@brenorb brenorb closed this Feb 17, 2026
@brenorb brenorb deleted the build/migrate-pip-to-uv branch February 17, 2026 21:04
@brenorb brenorb restored the build/migrate-pip-to-uv branch February 17, 2026 21:05
@brenorb brenorb reopened this Feb 17, 2026
Copy link
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

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

Concept ACK

Nice PR! Directionally correct and right sized/scoped migration to uv per discussion on #29.

Only blocker is ci failures, i think uv pip install steps need --system (currently failing with “No virtual environment found”), I added some comments in the places I think that is. After that fix + green checks, this is good to merge.

- name: "Install wheel and run tests"
run: |
pip3 install ./dist/*.whl
uv pip install --python python3 ./dist/*.whl
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need --system?


- name: "Install wheel"
run: pip3 install ./dist/*.whl
run: uv pip install --python python3 ./dist/*.whl
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need --system?


- name: "Install dependencies"
run: Get-ChildItem 'D:\a\bdk-python\bdk-python\dist\*.whl' | ForEach-Object {pip install $_.FullName}
run: Get-ChildItem 'D:\a\bdk-python\bdk-python\dist\*.whl' | ForEach-Object {uv pip install --python python $_.FullName}
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need --system?

- name: "Install wheel"
run: pip3 install ./dist/*.whl
run: uv pip install --python python3 ./dist/*.whl
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need --system?


- name: "Install wheel"
run: pip3 install ./dist/*.whl
run: uv pip install --python python3 ./dist/*.whl
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need --system?


- name: "Install dependencies"
run: Get-ChildItem 'D:\a\bdk-python\bdk-python\dist\*.whl' | ForEach-Object {pip install $_.FullName}
run: Get-ChildItem 'D:\a\bdk-python\bdk-python\dist\*.whl' | ForEach-Object {uv pip install --python python $_.FullName}
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this need --system?

CI installs wheels into the runner/toolcache interpreter (no project venv), so uv pip install must opt in via --system.

Also update local helper/docs to prefer installing into a project venv.
Copy link
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

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

Great stuff! I tested locally and it worked really well (plus it builds and runs the tests in about a tenth of the usual time).

I have just a few comments/requested changes, and we're good to go.

Use long-form  flags across workflows, remove unused  from dev deps (and refresh ), and update  api-docs to run  before Sphinx.
Copy link
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

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

ACK 057fd56.

@thunderbiscuit thunderbiscuit merged commit 057fd56 into bitcoindevkit:master Feb 19, 2026
17 checks passed
@brenorb brenorb deleted the build/migrate-pip-to-uv branch February 19, 2026 20:00
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 scripts to use uv

3 participants

Comments