blue-city-97042
11/14/2023, 7:35 PM[setup-py-generation]
first_party_dependency_version_scheme = "compatible"
If you need to then revert to having absolute versions, then you can add the appropriate command line flag in the specific build of your python_distribution to make it to use exact.
For instance:
pants package --setup-py-generation-first-party-dependency-version-scheme=exact src/python/mypackage:
Additionally, a lockfile can be generated using the generate-lockfiles goal. The lockfile will make it so that if you have Pex binaries created from your distribution, that it's guaranteed to have consistent results. I'm also parsing it using commentjson to create constraints to peg my non-pex binary package so I can have repeatable results.curved-shampoo-96935
11/14/2023, 9:28 PMsetup-py-generation to see if it can be helpful.
I’m aware of changing requirements.txt to drop the bounds and the distributed python package will also have the looser bound. My original question is really about people’s workflow. ie what requirement files are manually populated, and what is populated by tools.
Today my workflow is manually writing the equivalent of <http://requirements.in|requirements.in> -- (pip-compile) --> requirements.txt -- (pants generate-lockfiles) --> lockfile_path.lock -- (pants package <target>) --> package.tar.gz
In <http://requirements.in|requirements.in> I use loose bounds, and because each of the intermediate step is automated, the final one produced has strict bounds.