<#12449 Allow `[python_tool].version` and `[python...
# github-notifications
c
#12449 Allow `[python_tool].version` and `[python-tool].extra_requirements` to point to `python_requirement` targets? Issue created by Eric-Arellano A weird thing with our tool support is that you can have the same requirement both to run a tool and as a library imported by your code. Classic example: Pytest. Right now, you have to be careful to set the pytest version in both your requirements.txt and
[pytest].version
, violating DRY. Instead, this proposal would update
PythonToolBase
to allow either using a raw requirement string or a target address for a
python_requirement_library
, so you could do this:
Copy code
# requirements.txt
pytest==5.6.1
Copy code
[pytest]
version = "//:pytest"
pantsbuild/pants