https://pantsbuild.org/ logo
#general
Title
# general
a

average-australia-85137

10/20/2021, 1:25 PM
hello! In pants 2.7.0 I’m running pants tailor and it.. is adding pex_binary targets to my build files? Is there some way to turn this off
h

hundreds-father-404

10/20/2021, 1:28 PM
Hello! There is:
Copy code
[python-setup]
tailor_pex_binary_targets = false
Does it have false positives?
a

average-australia-85137

10/20/2021, 1:28 PM
thanks!
uh our codebase is… really not good and has a bunch of like… if name == “__main__” snippets in there for testing and we aren’t using the pex targets so we don’t need them anyway!
👍 1
h

hundreds-father-404

10/20/2021, 1:31 PM
Cool, thanks! We have some false positives internally too due to testing. Not relevant to you, but, I want to add a more granular ignore mechanism so you can ignore specific targets and paths
Oh hm with not using pex_binary, are you not using
./pants run
? Totally okay if not, but curious if so and what we could improve there
a

average-australia-85137

10/20/2021, 1:49 PM
uh we aren’t using pants run right now but I would like to figure out a way to have that be our interface with running the docker images we’re produccing
h

hundreds-father-404

10/20/2021, 1:55 PM
Double checking if you've seen Pants's new docker support added by @curved-television-6568? https://blog.pantsbuild.org/pants-pex-and-docker/ I know you had developed your own plugin earlier.
running the docker images we’re produccing
Not sure if this is what you literally mean, but FYI Pants 2.8 now allows you to do
./pants run
on a dockerfile
a

average-australia-85137

10/21/2021, 1:19 PM
I haven’t looked too deeply into it! I like how we don’t need dockerfiles for our (admittedly simple) usecase but since we don’t have dockerfiles we can’t… run
./pants run
on a dockerfile
c

curved-television-6568

10/21/2021, 1:47 PM
@average-australia-85137 you don’t need a dockerfile to get pants run support. If you look at how we’ve implemented it, I think you could apply something similar in your plugin.. https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/docker/goals/run_image.py
👀 1
a

average-australia-85137

10/21/2021, 2:06 PM
oh neat - thanks I’ll look into it for us
5 Views