proud-dentist-2284412/03/2022, 7:27 PM
. • Can I export the same resolve multiple times, each with a different python interpreter? Background: For st2 CI, I need one virtualenv for python 3.8 and another for python 3.6 (3.6 is ancient I know. updating that is a separate effort). I will use the exported virtualenvs instead of a Makefile managed venv for processes that have not yet been configured in pants. Eventually, I'll be able to stop using the exported virtualenv and just use pants for everything, but this should help to bridge that gap.
flat-zoo-3195212/05/2022, 2:50 PM
I would expect files that import that like
to be an affected transitive dependent, but it doesn't seem like this is the case. Is there a way to enable this behavior if it exists? Or does that imply scanning deps on two different versions of the worktree?
freezing-lamp-1212312/05/2022, 4:18 PM
modern-manchester-3356212/05/2022, 4:37 PM
. Recently it's become an absolute path which is quite annoying.
./pants generate-lockfiles --resolve=my-resolve
fresh-cat-9082712/05/2022, 5:00 PM
abundant-autumn-6799812/05/2022, 6:43 PM
- these end up in the target
. Is there a way to install data files outside
as well, without using setup.py or Python build mechanisms? If not, I can repurpose
to ship data files into, say
. However is there an easy way to discover the path of the venv when running the pex-file? We build with pex tools but do not unpack the pex-file manually.
thousands-sandwich-263512/05/2022, 7:50 PM
, and implement our own cache so that we only rebuild modules that have changed. I can define a distribution target for the library in Pants that triggers the
routine, but in this case our cache doesn't work. And when building the Pex, I'd like to bring along just those shared library files that are required and not the whole boatload. It seems like what I want is to be able to define a target for each eventual shared library file, with dependencies looking something like:
Before I dive too deep into the plugin framework, any pointers or feedback? If I were to go the route of writing a plugin, any words of advice for how to think about this?
pex -> application code -> .so file -> .py source
loud-laptop-1794912/05/2022, 8:53 PM
to output only filenames and not the owning target name as well?
high-yak-8589912/05/2022, 9:32 PM
and it seems to work fine, so we always have that as a fallback.
fresh-cat-9082712/05/2022, 10:48 PM
does when dependency inference is disabled and enabled 🧵
eager-dress-6640512/05/2022, 11:10 PM
for different segments of the codebase. Is this something pants might want to support natively? Any advise on what a plugin for it might look like?
best-byte-7377512/06/2022, 10:17 AM
billions-keyboard-3310212/06/2022, 5:19 PM
- I couldn’t remove the
from the python path 😞 https://pex.readthedocs.io/en/latest/api/vars.html#PEX_INHERIT_PATH
enough-analyst-5443412/06/2022, 5:47 PM
? If its the latter, I think you can, you just don't use - I forget the terminology exactly - the standard AWS Lambda executor. They have an API to plug that.
enough-analyst-5443412/06/2022, 5:50 PM
where that dir includes an executable
file meeting their specs. If that proves difficult, perhaps a feature can be added to ... Pants I think, to do that for you. This feels 1 level higher than Pex, Pants knows AWS Lambda, Pex does not - currently.
enough-analyst-5443412/06/2022, 6:17 PM
instead. That supports
config (https://www.pantsbuild.org/docs/reference-pex_binary#codeinherit_pathcode). You really only need
for the lambda zip deployment scheme and even that is only historically true. You can now use a plain old PEX (
again) for that too; you just prefix your lambda entry point configuration value out in AWS with
to make PEX files as lambda zips work.
gentle-painting-2454912/06/2022, 6:23 PM
has a Pyrex file (
) that gets compiled to a C Extension (
) at build time. The issue that I’m having is with plain Python projects in the monorepo that depend on that module. So in
the following import raises an error,
. My current workaround has been to create multiple resolves so that
from package_1.foo import bar
is actually a third party dependency for
statement passes as expected. But I don’t really like that solution and now I’m stuck with an issue where in order to make a change to both
from package_1.foo import bar
I have to go through the burdensome process of changing
and republishing it and then changing
. Is there any pants magic that will allow me to keep both of these projects using the same resolve (i.e.
depends on the compiled
instead of the uncompiled code)?
aloof-appointment-3098712/06/2022, 6:25 PM
Are Go build artifacts tracked in the same way? Any examples or documentation to point me to?
FROM python:3.8 ENTRYPOINT ["/example_app"] COPY apps.python.example_app/example_app_bin.pex /example_app
billions-keyboard-3310212/06/2022, 6:30 PM
enough-analyst-5443412/06/2022, 6:34 PM
like I said and ensure a few things like a
that matches AWS (I can provide more info there is needed),
to solve your problem without having to set
env vars out in AWS and a handler spec like
billions-keyboard-3310212/06/2022, 6:35 PM
enough-analyst-5443412/06/2022, 6:35 PM
target / rules.
freezing-lamp-1212312/06/2022, 8:24 PM
There is a predefined rule to go from PexProcess -> Process, so Get(ProcessResult, Process) will cause the engine to run PexProcess -> Process -> ProcessResult.is it possible to create your own external tool installer which runs a specific command to get the environment correctly setup, similar to the pex machinery and
high-yak-8589912/06/2022, 8:54 PM
target for me for the majority of simple cases where we're just doing the standard base image and copying in a pex. Any recommendations on how to autopopulate the
line of the
? I'd like to avoid requiring the user to specify the full path to the module that serves as the entrypoint for the
, but I'm not sure there's another way.
curved-television-656812/06/2022, 9:11 PM
lemon-oxygen-7249812/06/2022, 9:29 PM
command tests all versions. Sounds cool on paper. But getting
./pants test ::
work fast in the CI is a job in itself. How do you people do that smartly on GitHub actions? Any pointer?
sparse-lifeguard-9573712/06/2022, 9:49 PM
./pants export --symlink-python-virtualenv
high-yak-8589912/06/2022, 9:57 PM
set to a list and
target, but I'm getting an error like "provides both a Dockerfile with the
field, and Dockerfile contents with the
field, which is not supported.". To fix, it's saying to set
. When I do
, things are happy.