From dc80c9d086971a8a35aafd4ce86611f71a48d5de Mon Sep 17 00:00:00 2001 From: Martin Belanger Date: Tue, 10 Mar 2026 08:35:57 -0400 Subject: [PATCH] ci: use total commit count for unique TestPyPI dev version Also updated Python README.md to show how to install from TestPyPI Signed-off-by: Martin Belanger --- .github/workflows/libnvme-release-python.yml | 2 +- libnvme/libnvme/README.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/libnvme-release-python.yml b/.github/workflows/libnvme-release-python.yml index 81ce908f85..b6277e1c3f 100644 --- a/.github/workflows/libnvme-release-python.yml +++ b/.github/workflows/libnvme-release-python.yml @@ -66,7 +66,7 @@ jobs: id: version run: | TAG=$(git describe --tags --abbrev=0) - REV=$(git rev-list "$TAG"..HEAD --count) + REV=$(git rev-list HEAD --count) BASE_VERSION="${TAG#v}" VERSION="${BASE_VERSION}.dev${REV}" echo "dev_version=$VERSION" >> $GITHUB_OUTPUT diff --git a/libnvme/libnvme/README.md b/libnvme/libnvme/README.md index a0142f1ef2..0d370d5566 100644 --- a/libnvme/libnvme/README.md +++ b/libnvme/libnvme/README.md @@ -64,3 +64,13 @@ host = None ctx = None ``` +## Testing PyPI package + +Use the following command to test installing the package from TestPyPI before publishing to the official PyPI registry. + +```bash +pip install \ + --index-url https://test.pypi.org/simple/ \ + --extra-index-url https://pypi.org/simple/ \ + libnvme==[libnvme-version] +```