Hi all, I have a question about the `python_requir...
# general
c
Hi all, I have a question about the
python_requirements
target in a python repo. Is it possible for pants tailor to ignore pyproject.toml in favor of requirements.txt? I have a pyproject.toml and generated requirements.txt. When I run
pants tailor ::
It generates the following two targets.
Copy code
python_requirements(
    name="reqs0",
)

python_requirements(
    name="root",
    source="pyproject.toml",
)
I looked around the docs and couldn’t see anyway to configure this. And IIUC, this is the GH issue that introduced the pyproject.toml check to pants tailor.
1
The issue with having two
python_requirements
is that they produce
python_requirement
target for each dep twice, so pants will complain that the owner is ambiguous
g
Have you tried
pants-ignore
option?
c
Hmm. I didn’t. But actually after digging into that issue and the associated PR I found setting the following in pants.toml works
Copy code
[python]
tailor_requirements_targets = false
So I solved my own question 😅
I’ll look up pants-ignore as well
👀 1
d
i'm using
ignore_paths
under
[tailor]
for something similar https://www.pantsbuild.org/stable/reference/goals/tailor#ignore_paths
👀 1
c
Just wanna loop back and say thanks all for the suggestions! Really appreciate it!