wasi-master / rich-rst

A reStructuredText renderer for rich
https://rich-rst.readthedocs.io/en/latest/
MIT License
13 stars 3 forks source link

Convert to pyproject.toml, use setuptools_scm to manage version. #15

Closed BrianPugh closed 4 months ago

BrianPugh commented 4 months ago

The main goal of this PR is to keep rich_rst.__version__ in sync with the actual tagged version. This PR also migrates the project over to the more modern pyproject.toml project configuration.

I also added setuptool-scm. Basically it will infer the version based off of the most recent git tag it can find. E.g. if you do:

git tag v2.0.0

and then do a

python -m build

it will build:

dist/rich_rst-2.0.0-py3-none-any.whl

It updates the internal __version__ variable for you too:

# after pip installing the wheel
import rich_rst
assert rich_rst.__version__ == "2.0.0"

I'll be following this up with a github action to do automatic publishing for you.

wasi-master commented 4 months ago

I'd like you to revert the changes from #16 and I'll merge this

BrianPugh commented 4 months ago

This PR didn't have commits from #16 (#16 was based on this PR, not the other way around). Regardless, I rebased this PR off of current main and resolved conflicts. Ready for another look! Thanks again for merging and cutting releases!