mistletoe icon indicating copy to clipboard operation
mistletoe copied to clipboard

Modernize project setup (add pyproject.toml, etc.)

Open pbodnar opened this issue 1 month ago • 2 comments

See https://packaging.python.org/en/latest/guides/modernize-setup-py-project/#modernize-setup-py-project.

This should include getting rid of using MANIFEST.in for manually specifying source distribution (sdist) includes and excludes (see e.g. #253). This can be achieved by using setuptools-scm, which simply includes only versioned files in the sdist archive.

After migration to PEP-517/518, we can no longer import mistletoe (mistletoe.__version__) in setup.py. So we need to read mistletoe version in another way. While at it, we can use setuptools-scm for automatic version file generation.

Note: Whilst using setuptools-scm seems to be possible for sdist even without pyproject.toml, the setuptools-scm guys state it is clearly not the recommended way.

pbodnar avatar Dec 07 '25 15:12 pbodnar

Anyone interested to contribute and to take care of this? :) I'm not sure if I've got enough time/will to play with this and a help from some experienced setup-er would probably come handy...

pbodnar avatar Dec 07 '25 15:12 pbodnar

Another issue to resolve is the question of supporting Python 3.5 and 3.6. The builds currently fail and they would need to be replaced by a different pipeline definition. Or we could drop support for older Python versions, as was done already before. Potentially a topic for a separate task...

pbodnar avatar Dec 07 '25 15:12 pbodnar