From 195d12229c07382a9b2aaf1144ce091ed9af2ebb Mon Sep 17 00:00:00 2001 From: Marcelo Duarte Date: Tue, 10 Feb 2026 01:04:44 -0300 Subject: [PATCH 1/4] Improved 'uv' integration --- .github/workflows/build.yml | 18 ++++---- .github/workflows/ci.yml | 4 +- Makefile | 16 ++++--- ci/build-wheel.sh | 65 ++++++++-------------------- ci/install-tools.sh | 86 ++++++++++++++++++++++++++----------- pyproject.toml | 56 ++++-------------------- src/msilib/__init__.py | 3 +- 7 files changed, 110 insertions(+), 138 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3456a1..e7897da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build wheel +name: Build wheels on: release: @@ -97,16 +97,16 @@ jobs: git config user.name "Marcelo Duarte" git config user.email marcelotduarte@users.noreply.github.com SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) - VERSION=$(uvx bump-my-version show current_version 2>/dev/null) - VERSION_BASE=$(python -c "print('$VERSION'.rsplit('-',1)[0])") - if [ "${{ github.event_name }}" == "pull_request" ]; then - OPTIONAL=".${{ github.event.number }}" + VERSION=$(uv version --short) + if ($VERSION | grep -q "\-dev"); then + uv version --no-sync --bump dev=$SOURCE_DATE_EPOCH else - OPTIONAL="" + uv version --no-sync --bump patch --bump dev=$SOURCE_DATE_EPOCH fi - VERSION_NEW=$VERSION_BASE$OPTIONAL-dev.$SOURCE_DATE_EPOCH - uvx bump-my-version bump --no-tag build --new-version=$VERSION_NEW 2>/dev/null - git log -1 + NEW_VERSION=$(uv version --short) + git checkout -b build-$NEW_VERSION + git commit -m "Bump version: ${VERSION} → ${NEW_VERSION} [ci skip]" -a + git log -2 - name: Build sdist and wheels run: ./ci/build-wheel.sh "${{ matrix.tag }}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8d4bb1..6f159ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,9 +100,9 @@ jobs: pattern: python-msilib-wheel-${{ matrix.os }}* path: wheelhouse - - name: Install dependencies to test + - name: Install dependencies run: | - uv pip install --extra tests --upgrade -r pyproject.toml + uv pip install -r pyproject.toml --upgrade --group tests uv pip install python-msilib -f wheelhouse \ --no-build --no-deps --no-index --prerelease=allow --reinstall diff --git a/Makefile b/Makefile index 1463766..ad9d3c0 100644 --- a/Makefile +++ b/Makefile @@ -64,20 +64,24 @@ cov: wheel .PHONY: release release: - bump-my-version show-bump 2>/dev/null + uv version @echo "Run:" - @echo " bump-my-version bump