brief-france-15962
09/19/2024, 7:07 PMsetup_requires
, and some internal sdists rely on that to specify they need Cython to build.
However, the latest versions of pex do have a handy --extra-pip-requirement
flag to let me force Cython into its buildtime venv.
I've made use of __defaults__
to get this passed down to pex via pex_binary's extra_build_args opt. Something like...
__defaults__(
extend=True,
all=dict(
extra_build_args=[
"--extra-pip-requirement=Cython==3.0.11",
],
)
)
This has every pex_binary I've defined myself building and working as expected.
However, it doesn't seem to be applying to what I assume is an implicit pex target: the mypy
one used as part of pants check ::
- which will resolve some of these oddball sdists. This fails with an error I expect to see if Cython isn't available at build time.
Am I just mistyping the __defaults__
incantation here? Or is there something else I'm missing?broad-processor-92400
09/20/2024, 6:36 PMpants check ::
won't build the `pex_binary`s, it'll be handling the source code as python_sources/distributions more directly... so it's expected that that default won't improve the behaviour of pants check ::
. I'm not exactly sure of the best way to handle this though.brief-france-15962
09/20/2024, 6:37 PM