diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40f4d50..b1e4845 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,13 @@ jobs: submodules: true persist-credentials: false + - name: Install the latest version of uv + uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # 6.3.1 + with: + enable-cache: false + - name: Build - run: pipx run build + run: uv build - uses: actions/upload-artifact@v4 with: diff --git a/HISTORY.rst b/HISTORY.rst index 6570043..6d3c976 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,12 @@ History ------- +5.2.0 +++++++++++++++++++ + +* Setuptools has been replaced with the uv build backend for building the + package. + 5.1.0 (2025-05-05) ++++++++++++++++++ diff --git a/pyproject.toml b/pyproject.toml index 0961762..d10381a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,11 +41,19 @@ lint = [ ] [build-system] -requires = [ - "setuptools>=77.0.3", - "setuptools-scm", +requires = ["uv_build>=0.7.19,<0.8.0"] +build-backend = "uv_build" + +[tool.uv.build-backend] +source-include = [ + "HISTORY.rst", + "README.rst", + "LICENSE", + "docs/html", + "examples/*.py", + "tests/*.py", + "tests/data/test-data/*.mmdb" ] -build-backend = "setuptools.build_meta" [project.urls] Homepage = "https://www.maxmind.com/" @@ -81,12 +89,9 @@ ignore = [ [tool.ruff.lint.per-file-ignores] "docs/*" = ["ALL"] -"geoip2/{models,records}.py" = [ "D107", "PLR0913" ] +"src/geoip2/{models,records}.py" = [ "D107", "PLR0913" ] "tests/*" = ["ANN201", "D"] -[tool.setuptools.package-data] -geoip2 = ["py.typed"] - [tool.tox] env_list = [ "3.9", @@ -114,7 +119,7 @@ dependency_groups = [ "lint", ] commands = [ - ["mypy", "geoip2", "tests"], + ["mypy", "src", "tests"], ["ruff", "check"], ["ruff", "format", "--check", "--diff", "."], ] diff --git a/geoip2/__init__.py b/src/geoip2/__init__.py similarity index 100% rename from geoip2/__init__.py rename to src/geoip2/__init__.py diff --git a/geoip2/_internal.py b/src/geoip2/_internal.py similarity index 100% rename from geoip2/_internal.py rename to src/geoip2/_internal.py diff --git a/geoip2/database.py b/src/geoip2/database.py similarity index 100% rename from geoip2/database.py rename to src/geoip2/database.py diff --git a/geoip2/errors.py b/src/geoip2/errors.py similarity index 100% rename from geoip2/errors.py rename to src/geoip2/errors.py diff --git a/geoip2/models.py b/src/geoip2/models.py similarity index 100% rename from geoip2/models.py rename to src/geoip2/models.py diff --git a/geoip2/py.typed b/src/geoip2/py.typed similarity index 100% rename from geoip2/py.typed rename to src/geoip2/py.typed diff --git a/geoip2/records.py b/src/geoip2/records.py similarity index 100% rename from geoip2/records.py rename to src/geoip2/records.py diff --git a/geoip2/types.py b/src/geoip2/types.py similarity index 100% rename from geoip2/types.py rename to src/geoip2/types.py diff --git a/geoip2/webservice.py b/src/geoip2/webservice.py similarity index 100% rename from geoip2/webservice.py rename to src/geoip2/webservice.py