Hi, I'm a little confused on whether or not I am a...
# general
Hi, I'm a little confused on whether or not I am able to use my own lockfile as is. I've set
Copy code
enable_resolves = true
resolves = {python-default = "requirements.txt"}
in my pants.toml but then I get the following error:
Copy code
InvalidLockfileError: Could not find a Pants metadata block in the lockfile `requirements.txt` for `python-default`. To resolve this error, you will need to regenerate the lockfile by running `./pants generate-lockfiles --resolve=python-default`.
A few outside factors are preventing me from running poetry on this build machine so generating the lockfile using poetry is failing. Can someone help me understand why the lockfile has to be regenerated?
Use ignore to avoid needing a lockfile header at all, e.g. if you are manually managing lockfiles rather than using the generate-lockfiles goal.
ah, thank you!
Is your requirements.txt a lockfile?
Usually requirements.txt is just a loose list of direct requirements
a lockfile contains dependency pins for the entire transitive dep graph
You can use Pants without a lockfile, or you can have Pants generate the lockfile using Pex instead of Poetry
But manually managing a lockfile is difficult
Hi @happy-kitchen-89482, first off, thanks for all your work on this project. I listened to your SE Daily podcast episode last week and immediately saw that it could solve a lot of my nagging issues around the build/deploy process.
❤️ 2
i'm using poetry (export) to manage dependencies in the dev environment (my laptop) but i've run into a few hitches running poetry on the build hosts/production since they are firewalled off from the internet
ah, yes, that will be tricky
so how do they work today?
oh its embarrassing. mostly git pulling to a fresh vm and then one or two shell scripts to put everything in place. our main codebase is in java and my python repo is for the operations/reporting/support-type stuff. the java team uses bamboo a lot so i am looking to incorporate that a bit more as we're currently doing some greenfield rebuilding
i was thinking i should be able to build a poetry pex and host that on our internal artifact host
but definitely not opposed to using pex to generate lockfiles
i'm just getting started with pants but looking forward to learning a lot more and hopefully even contributing
🎉 1
I'm in europe right now so it's my bed time, but I'll tackle any further questions tomorrow. 🙂
Do you have an internal artifactory or something that those build machines are allowed to connect to and download from?
You also mentioned production, so I'm curious why you'd need Pants to run on a production machine
cheers. yep nexus
i guess more of a build machine now that i can build pex's
So you can configure Pants to talk to a custom repository instead of PyPI
but it was kind of a "production" machine since i was pulling from git and running in place. didn't really have any sort of formal build process
yep. got that working