Skip to content

How to deal with recurring 3rd party dependency resolution issues #17273

Answered by benjyw
navijation asked this question in Q&A
Discussion options

You must be logged in to vote

To your question 1: "Is it wrong to have multiple requirement files using the same resolve and with overlapping deps?"

That is not typically how a resolve is defined or used, so I'm not surprised it's causing problems...

First, to clarify the target types: A python requirement is represented by a python_requirement() stanza in a BUILD file, say 3rdparty/python/BUILD:

python_requirement(
  name="django",
  requirements=["Django>=3.2.8,<4"],
)

That creates a target that Pants knows provides the django package. When Pants sees, say, from django.conf import settings in one of your source files, it infers a dependency from that file onto 3rdparty/python:django.

Now, since typing out those exp…

Replies: 4 comments 1 reply

Comment options

benjyw
Oct 19, 2022
Maintainer Sponsor

You must be logged in to vote
0 replies
Comment options

benjyw
Oct 19, 2022
Maintainer Sponsor

You must be logged in to vote
0 replies
Answer selected by navijation
Comment options

benjyw
Oct 19, 2022
Maintainer Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@benjyw
Comment options

benjyw Oct 20, 2022
Maintainer Sponsor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants