boundless-monitor-67068
08/19/2025, 12:46 PMfrom dagster import Definitions
. The dependency package is also dagster, so not a case of non-standard package name. A couple of additional findings:
⢠there are several python_requirements
targets with the same package included, I'm explicitly setting one of them as a dependency
⢠explicitly adding an entry to the module_mapping of the corresponding python_requirement
helps: module_mapping={"dagster": ["dagster.Definitions"]}
("dagster.*"
wouldn't work)
Anyone here that could point to the right direction? TIAelegant-florist-94385
08/19/2025, 1:54 PMpython_requirements
targets with the same package included"
What is your reason for this? are you trying to work with multiple resolves?boundless-monitor-67068
08/19/2025, 2:50 PMelegant-florist-94385
08/19/2025, 2:55 PMpython_requirements
targets is just a way of declaring them. (python_requirements
is just a macro to create a lot of individual python_requirement
targets)
Assuming you are only using a single resolve/lockfile, each python_requirements
target can be read as "Hey pants, please put this list of 3rd party dependencies into the lockfile".elegant-florist-94385
08/19/2025, 2:57 PMelegant-florist-94385
08/19/2025, 3:01 PMpython_requirements
at `3rdparty/python/requirements.txt
⦠put all dependencies used by anything here (you can still use separate python_requirements
, but it will be more confusing since the requirements are not actually separate
⦠Any python source file can import and use these requirements, and pants dependency inference will ensure that the systems use the minimal subset of dependencies required. (eg. if you build a pex file, it will only contain the 3rd party packages that are (transiticely) imported by one of the source files)elegant-florist-94385
08/19/2025, 3:04 PMelegant-florist-94385
08/19/2025, 3:05 PMparametrize
to describe multiple resolves for a dependency to be installed into, and for a source to run in, and to lint, typecheck, and test against)boundless-monitor-67068
08/19/2025, 3:35 PMpython_requirements
another go at some point soon! appreciate all the input šelegant-florist-94385
08/19/2025, 3:36 PM