Does `DistBuildRequest` or `DistBuildChrootRequest...
# plugins
w
Does
DistBuildRequest
or
DistBuildChrootRequest
support adding arbitrary dependencies? https://github.com/pantsbuild/pants/blob/0ce449f9181c690dbf60b2bc51b0e97f285eb9ae/src/python/pants/backend/python/goals/setup_py.py#L385-L417 I'm working on the
mypyc
plugin, and it works relatively well, but when I add a 3rd party dep, it cannot be found - I assume because it can't find the dep within the build context. I manually hackjobbed this by creating a custom pyproject.toml and then adding my dep to the [build-system].requires field, just to see if it would work. Seemingly it does, so now I'm trying to figure out how to correctly get it into the pipeline. I can access the field in the transitive dependencies, so that's not a problem. The end goal is a wheel with the compiled objects inside.
Even easier, and dirtier, I could achieve the same without the pyproject.toml - and just adding my hardcoded 3rd party dep in the
setuptools
section of pants.toml
Related, I had originally just created overrides for
setup_kwargs
and
generate_setup_py_content
but I'm now overriding the BuiltPackage section in order to try and add my deps to the process... Is there an easy way of ensuring that ONLY my custom
package_python_dist
runs? I re-generated a UnionRule, modified the target_type with a custom Dependencies, but this is a weird example where I would want many of the
python_distribution
rules to run, except the final one.
Instead, my rule appears to be running twice - causing a duplication error during dist generation. That's turning out to be difficult to debug, because I'm not sure why it would be called twice Edit - Wiped all the caches and now it works correctly
Bump.