rasterio / affine

Affine transformation matrices
BSD 3-Clause "New" or "Revised" License
156 stars 28 forks source link

Use a declarative configuration #66

Closed mwtoews closed 2 years ago

mwtoews commented 2 years ago

This PR moves most of the static package metadata into a declarative configuration file, setup.cfg. It also adds a basic pyproject.toml file.

The only "dynamic" part of setup.py that remains is to get the version from affine/__init__.py. This file also serves as a shim if setup.py is expected, even though it hasn't been required for over 5 years now.

If the version info is moved to (e.g.) affine/_version.py, then setup.cfg would only need to specify attr: affine._version.version. This can be done here, or later.

Other changes:

mwtoews commented 2 years ago

Rewrote the version to take from the affine.__init__.__version__, which isn't a problem as there are no dependencies from this file.

Also removed setup.py, which means the way to build is python -m build, which builds two files in dist. See docs here for setup.cfg-only projects. A small shim setup.py can be re-added.

mwtoews commented 2 years ago

Closing with preference to #67