diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d32eb7a454..f80d2fb3ced 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,9 +30,9 @@ jobs: with: python-version: "3.12" - name: Install dependencies - run: pip install -U pip build wheel setuptools + run: pip install -U pip hatch - name: Build distributions - run: python -m build + run: hatch build - name: Upload package as artifact to GitHub if: github.repository == 'projectmesa/mesa' && startsWith(github.ref, 'refs/tags') uses: actions/upload-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index 7e84213dc84..25477e7a0d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,6 @@ [build-system] -requires = [ - "setuptools", - "wheel", -] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "Mesa" @@ -73,12 +70,11 @@ repository = "https://github.com/projectmesa/mesa" [project.scripts] mesa = "mesa.main:cli" -[tool.setuptools.packages.find] -include = ["mesa*"] -exclude = ["tests*"] +[tool.hatch.build.targets.wheel] +packages = ["mesa"] -[tool.setuptools.dynamic] -version = {attr = "mesa.__version__"} +[tool.hatch.version] +path = "mesa/__init__.py" [tool.ruff] # See https://github.com/charliermarsh/ruff#rules for error code definitions.