terrier-org / pyterrier

A Python framework for performing information retrieval experiments, building on http://terrier.org/
https://pyterrier.readthedocs.io/
Mozilla Public License 2.0
415 stars 65 forks source link

pyproject.toml #489

Open cmacdonald opened 1 month ago

cmacdonald commented 1 month ago

DEPRECATION: Legacy editable install of python-terrier==0.11.0 from file:///Users/craigm/git/pyterrier (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457

seanmacavaney commented 1 month ago

pyproject.toml introduces several nice features, including a way to declaratively link the version in the project specification with where it's defined in code (instead of programmatically as we do now).

[tool.setuptools.dynamic]
version = {attr = "pyterrier.__version__"}

An example going from setup.py to pyproject.toml here: https://github.com/seanmacavaney/pyterrier-alpha/commit/099c6f5c8de410fc18d5ca1804bcb07c3f64cfb6