poliastro / czml3

Python 3 library to write CZML
https://pypi.org/project/czml3/
MIT License
42 stars 33 forks source link

TLC: packaging and development #123

Closed Stoops-ML closed 6 months ago

Stoops-ML commented 6 months ago

This PR brings the packaging and development of CZML3 a bit more up to date.

Stoops-ML commented 6 months ago

Seems that versioneer is incompatible with building from pyproject (using setuptools) as it requires a setup.py file. I'm also getting a lot of strange behaviour from mypy when running inside tox due to versioneer and no amount of excluding versioneer files, or any related file, has worked.

The idea of this PR was to update and simplify the development side of CZML3, hence moving all configurations and build information to the pyproject.toml file. However, this doesn't seem possible if using versioneer.

I like versioneer, however I'm not sure how useful it is for CZML3 and it's not such a well-maintained package (see here for the tip of the iceberg).

@astrojuanlu What would you like: continue with versioneer or move to pyproject?

PS I can submit a separate PR for implementing ruff.

astrojuanlu commented 6 months ago

Yeah, I commented on that issue... 😅

Maybe you can try https://github.com/python-versioneer/versioneer-518 ? (see context in https://github.com/python-versioneer/python-versioneer/issues/193)

Otherwise, other systems like PDM have more modern support for SCM versioning, see https://backend.pdm-project.org/metadata/#read-from-scm-tag-supporting-git-and-hg

In either case, yeah let's drop setup.py entirely and migrate to PEP 621 pyproject.toml

Stoops-ML commented 6 months ago

I'd rather not use versioneer-518 as it hasn't been updated for five years and seems to be made obsolete by versioneer.

PDM looks like a great alternative, especially reading from an SCM tag.

I'll close this issue and submit a PR for the ruff implementation followed by another for PDM.