marisa-trie icon indicating copy to clipboard operation
marisa-trie copied to clipboard

move setuptools to setup_requires, use importlib.metadata in test

Open bollwyvl opened this issue 1 year ago • 3 comments

Hi, thanks for this tool!

This PR moves setuptools from a runtime requirement (which it does not appear to use) to a build time requirement.

I guess the recommended approach would be to remove both fields from setup.py, and declare a minimal pyproject.toml:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

Update: 05a88f8 changes the test time use of pkg_resources.get_distribution to importlib.metadata.distribution, which also handles the email parsing behavior.

bollwyvl avatar Mar 13 '25 23:03 bollwyvl

I would love to see a move to pyproject.toml if you are still available! A small rebase from the master branch would be good too :)

BoboTiG avatar May 17 '25 11:05 BoboTiG

Example: https://github.com/TkTech/pysimdjson/blob/5dbc1bfd9fcaff0d3bf1c25e6cd35448691fdbdb/pyproject.toml

BoboTiG avatar May 18 '25 06:05 BoboTiG

Example: https://github.com/TkTech/pysimdjson/blob/5dbc1bfd9fcaff0d3bf1c25e6cd35448691fdbdb/pyproject.toml

I believe you'd lose support for a few of your currently supported versions of Python, since the features I use in the pysimdjson pyproject.toml for building extensions are experimental and Python 3.9+.

TkTech avatar May 18 '25 16:05 TkTech

Opened #120 to move most of the metadata over to pyproject.toml.

cdce8p avatar Jun 28 '25 19:06 cdce8p

Superseded by #120. Thanks for the patch anyway @bollwyvl :clinking_glasses:

BoboTiG avatar Jun 29 '25 09:06 BoboTiG