Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from setuptools to hatch #1882

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v3
Expand Down
9 changes: 0 additions & 9 deletions MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Coverage status](https://codecov.io/gh/projectmesa/mesa/branch/main/graph/badge.svg)](https://codecov.io/gh/projectmesa/mesa)
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![chat](https://img.shields.io/matrix/project-mesa:matrix.org?label=chat&logo=Matrix)](https://matrix.to/#/#project-mesa:matrix.org)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)

Mesa allows users to quickly create agent-based models using built-in
core components (such as spatial grids and agent schedulers) or
Expand Down
16 changes: 6 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[build-system]
requires = [
"setuptools",
"wheel",
]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "Mesa"
Expand Down Expand Up @@ -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.
Expand Down