rhythmic-morning-87313
04/29/2022, 12:32 PMpackages/common/pyproject.toml
. I'd like to refer this in`src/ai/backend/common/BUILD` 's resource
command, either in relative paths or absolute paths (based on the root), but it says it's not allowed. Is copying pyproject.toml
to src/ai/backend/common
the only way?
Q2: Is it possible to use existing setup.cfg
and their install_requires
configs in each project to specify 3rd-party dependencies per BUILD
target?
Q3: In pants.toml
I could specify per-tool options such as pytest.args
and pytest.extra_requirements.add
. How do I specify per-tool per-project options as well? (e.g., each project requires different sets of xxx-types
packages for type check)
Q4: How to single-source the version across multiple distribution targets in a (Python-based) mono-repository?curved-television-6568
04/29/2022, 12:42 PMresource
in the BUILD file in the same directory as it’s sources. Rather than copying, you may add a dependency between your resources
, so there may be a resource
in your ai backend with a dependency to the resource from your common tree. (dependencies may go any where, so are not restricted the same way as sources are)setup.py
and setup.cfg
per python_distribution
. See https://www.pantsbuild.org/docs/reference-python_distribution#codegenerate_setupcoderhythmic-morning-87313
04/29/2022, 12:49 PMsetup.cfg
as a dependency of python_distribution()
?curved-television-6568
04/29/2022, 12:50 PMrhythmic-morning-87313
04/29/2022, 12:51 PMsetup.cfg
has extra_requires
for test
, typecheck
, lint
, etc., it would be best to reuse them if possible.curved-television-6568
04/29/2022, 12:52 PMpython_artifact
, i.e. the distribution version you’re building?rhythmic-morning-87313
04/29/2022, 1:47 PMNoOwnerError: No python_distribution target found to own packages/common:pyproject. Note that the owner must be in or above the owned target's directory, and must depend on it (directly or indirectly). See <https://www.pantsbuild.org/v2.12/docs/python-distributions> for how python_sources targets are mapped to distributions. See <https://www.pantsbuild.org/v2.12/docs/python-distributions>.
curved-television-6568
04/29/2022, 1:54 PMrhythmic-morning-87313
04/29/2022, 1:59 PMpackages/common:pyproject
and src/ai/backend/common:lib
is /
curved-television-6568
04/29/2022, 2:01 PMrhythmic-morning-87313
04/29/2022, 2:04 PMcurved-television-6568
04/29/2022, 2:09 PMrhythmic-morning-87313
04/29/2022, 2:10 PMcurved-television-6568
04/29/2022, 2:12 PMrhythmic-morning-87313
04/29/2022, 2:12 PMcurved-television-6568
04/29/2022, 2:13 PMrhythmic-morning-87313
04/29/2022, 2:13 PMcurved-television-6568
04/29/2022, 2:14 PMhappy-kitchen-89482
04/29/2022, 9:41 PMsetup.cfg
would need to be in a resources()
target that the python_distribution()
target depends on