Is there a way to turn a python_dependency into a ...
# general
l
Is there a way to turn a python_dependency into a pex? I have a 3rdparty dependency (semgrep) that I want to run from a shell script. It would be awesome if I could tell pants to generate a pex for me.
1
h
l
awesome
maybe dumb question, but how do I run an example like that? I copied that into
src/bin/BUILD
in my repo and would expect
./pants run src/bin:black_bin
to work. What am I missing?
h
Is that not working? That is how you should do it. and you can use passthrough args like
./pants run src/bin:black -- --version
l
i think it is due to something in how we have lock files set up
👀 1
i will figure it out
h
you can also
./pants package
it then run from
dist
hm, whats going on?
l
this may reveal my ignorance more than anything - but when I use a version of black we have in our lock file it works, but if I use a different version it doesn't
and this is relevant because I was trying to work around some version conflicts in our lock file
h
a) By lockfile, do you mean a lockfile from
[python].resolves
? Or
[black].lockfile
? b) What do you mean with different versions? Like a
python_requirement
target?