Skip to content

Conversation

@mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Aug 24, 2025

This PR does two changes:

  1. Change from setuptools to hatchling build backend, which is modern and simpler. See "Why Hatch?" for background.
  2. Set minimum Python 3.9, which is the minimum tested version; see 2fc300f

The resulting sdist (.tar.gz) files are different. The newer sdist is larger, as it includes all files and subdirectories in tests. The previous setup only had a few files (not sure why). The bdist (.whl) files are nearly identical.

Setuptoools-related files setup.py and MANIFEST.in can be cleaned-up with this change.

@mwtoews
Copy link
Contributor Author

mwtoews commented Aug 25, 2025

Note error is unrelated to changes in this PR; see #307 for that issue.

from setuptools import setup

# See pyproject.toml for project metadata
setup(name="rasterstats")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goodbye setup.py !!

requires = ["setuptools >=61"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hatch looks like a good bet. The fact that it gets rid of setup.py and other sidecar config files is a big win.

@perrygeo perrygeo merged commit c620d12 into perrygeo:master Sep 2, 2025
4 checks passed
@mwtoews mwtoews deleted the min-py39 branch September 2, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants