diff --git a/.changeset/fix-pypi-publishing.md b/.changeset/fix-pypi-publishing.md new file mode 100644 index 00000000..bee8bbb5 --- /dev/null +++ b/.changeset/fix-pypi-publishing.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/python-sdk': patch +--- + +Fix package publishing to PyPI. diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7ce01332..f7e06162 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,7 +41,7 @@ jobs: run: uv build - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 e2e-tests: needs: publish diff --git a/pyproject.toml b/pyproject.toml index 225759bd..38d4eac0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,13 @@ dev = [ requires = ["hatchling"] build-backend = "hatchling.build" +[tool.uv] +# TODO: remove multiple-pin based on python version after we drop Python 3.9 support +build-constraint-dependencies = [ + "hatchling==1.32.0; python_version >= '3.10'", + "hatchling==1.27.0; python_version < '3.10'", +] + [tool.pylint.'MESSAGES CONTROL'] extension-pkg-whitelist = "pydantic" diff --git a/template/pyproject.mustache b/template/pyproject.mustache index 631f408e..30b1aac0 100644 --- a/template/pyproject.mustache +++ b/template/pyproject.mustache @@ -140,6 +140,13 @@ dev = [ [build-system] requires = ["hatchling"] build-backend = "hatchling.build" + +[tool.uv] +# TODO: remove multiple-pin based on python version after we drop Python 3.9 support +build-constraint-dependencies = [ + "hatchling==1.32.0; python_version >= '3.10'", + "hatchling==1.27.0; python_version < '3.10'", +] {{/poetry1}} [tool.pylint.'MESSAGES CONTROL'] diff --git a/uv.lock b/uv.lock index bcbe3918..95c6afe9 100644 --- a/uv.lock +++ b/uv.lock @@ -8,6 +8,12 @@ resolution-markers = [ "python_full_version <= '3.9'", ] +[manifest] +build-constraints = [ + { name = "hatchling", marker = "python_full_version < '3.10'", specifier = "==1.27.0" }, + { name = "hatchling", marker = "python_full_version >= '3.10'", specifier = "==1.32.0" }, +] + [[package]] name = "annotated-types" version = "0.7.0"