witty-crayon-22786
08/10/2021, 8:54 PMlocal_only=True
lockfile resolve, and binaries use a local_only=False
lockfile resolve.witty-crayon-22786
08/10/2021, 8:55 PMwitty-crayon-22786
08/10/2021, 8:58 PMlocal_only
mode.hundreds-father-404
08/10/2021, 9:11 PMwitty-crayon-22786
08/10/2021, 9:13 PMwitty-crayon-22786
08/10/2021, 9:16 PMenough-analyst-54434
08/11/2021, 3:29 AMwitty-crayon-22786
08/11/2021, 5:01 AMenough-analyst-54434
08/12/2021, 3:53 AMhundreds-father-404
08/12/2021, 5:24 PMwitty-crayon-22786
08/12/2021, 5:25 PMwitty-crayon-22786
08/12/2021, 5:25 PMhundreds-father-404
08/12/2021, 5:28 PM--platform
into a GitHub issuehundreds-father-404
08/12/2021, 7:25 PMenough-analyst-54434
08/12/2021, 7:58 PMhundreds-father-404
08/12/2021, 8:03 PMIOW if the latest compatible version of a package is sdist only, Poetry will rightly lock that. That will lead to no solution.In which case Pants will eagerly error before even touching Pex, explaining that they need to get a wheel for that dep or remove the dep from use
enough-analyst-54434
08/12/2021, 8:50 PMhundreds-father-404
08/12/2021, 9:00 PMenough-analyst-54434
08/12/2021, 9:08 PM--only-binary :all:
.witty-crayon-22786
08/12/2021, 9:11 PMwitty-crayon-22786
08/12/2021, 9:11 PMhundreds-father-404
08/12/2021, 9:11 PMenough-analyst-54434
08/12/2021, 9:23 PMwitty-crayon-22786
08/13/2021, 3:52 PMenough-analyst-54434
08/13/2021, 4:10 PMwitty-crayon-22786
08/13/2021, 4:10 PMenough-analyst-54434
08/13/2021, 4:10 PMwitty-crayon-22786
08/13/2021, 4:12 PMenough-analyst-54434
08/13/2021, 4:16 PMenough-analyst-54434
08/13/2021, 4:46 PM* Require Solution
PythonRepos:
+ --repos: No --find-links support in Poetry.
PythonSetup:
+ --requirement-constraints: Is there a way to map this concept all of the time or some of the time?
Support pip options for requirements <https://github.com/pantsbuild/pants/issues/12090>: Is the answer here that folks using pip options just don't get to use Pants generated lock files?
* Require care
There are some Pex options that affect resolves that Pants doesn't currently use (like --pre). If Pants decides to use them, care must be taken to map the Pex option to a Poetry equivalent when setting up a lock. In the `--pre` case there is a Poetry mapping of the concept that requires suffixing version with * and adding `allow-prereleases = true`.
* Solved
PexPlatformsField: We will produce locks that will cause Pex to needlessly error when building a PEX file whenever the latest compatible version of a dist is available as sdist only, but earlier compatible versions have compatible published wheels.
* Checked
SubprocessEnvironment (Pex / Pip / requests) knobs:
+ It looks like there are no official docs calling out use of PEX_ or PIP_ to solve any requirement resolution problems.
+ Poetry uses requests so these (HTTP_PROXY, etc) should pass through.
--ca-certs-path: Can map via `poetry config --local` (i.e.: poetry.toml) or POETRY_ env var.
PANTS_ knobs: Configuring indexes with auth in url and not wanting this written in a file can be achieved with POETRY_ env vars.
witty-crayon-22786
08/13/2021, 4:47 PMhundreds-father-404
08/13/2021, 11:04 PMenough-analyst-54434
08/16/2021, 2:07 PMenough-analyst-54434
08/16/2021, 2:10 PMenough-analyst-54434
08/16/2021, 2:11 PMenough-analyst-54434
08/16/2021, 2:16 PMpython setup.py egg_info
(or PEP-517) to get the metadata to trace dependencies and you can't do this when you want to do a platform agnostic lock since you may not have an appropriate interpreter to run that setup.py with (some setup.py actively check sys.executable and fail fast if its version is undersired - functools32 is an exapmple). Poetry punts here and simply expects the sdist has a PKG-INFO file in it already. I expect this is ok for any modern sdist and it just dies on old ones. I had to hack Pip to do similar and use PKG-INFO if present.
2. You can't simply turn off tag evaulation and marker evaluation. For marker evaluation you must handle the extras
marker and you must handle python_version
and python_full_version
- but just those three and no others.hundreds-father-404
08/16/2021, 5:24 PMwitty-crayon-22786
08/16/2021, 5:57 PMhundreds-father-404
08/16/2021, 5:59 PMwitty-crayon-22786
08/16/2021, 6:06 PMLet me know what further you want me to do if anything. To clean up my weekend hacks and do more exhaustive testing to get this added as a feature to Pex will probably be a few weeks of work.@enough-analyst-54434: it does seem like this would be worth pursuing, and probably more pressing than the native client work.
witty-crayon-22786
08/16/2021, 6:08 PMhundreds-father-404
08/16/2021, 6:09 PMenough-analyst-54434
08/16/2021, 6:20 PMhundreds-father-404
08/16/2021, 6:22 PMenough-analyst-54434
08/16/2021, 6:37 PMenough-analyst-54434
08/16/2021, 6:38 PMenough-analyst-54434
08/16/2021, 6:41 PMhundreds-father-404
08/16/2021, 6:49 PMpdm export
, they warn:
The exported requirements file is no longer cross-platform. Using it on other platforms may cause unexpected result.They reverted that feature, and we'd have to add it back. (
pdm.lock
looks to be cross-platform)enough-analyst-54434
08/16/2021, 6:59 PMhundreds-father-404
08/16/2021, 7:10 PMhundreds-father-404
08/16/2021, 7:12 PMI think thats +1 to my concern about the whole feature <cross-platform> since it appears Poetry is the last man standing on that oneYeah, I do think it's important (if we can robustly support it). We know many Pants users use macOS for desktop and Linux for CI / some desktop users When updating lockfiles, ideally Linux users don't need to bother a macOS dev to also regenerate the lockfile - imagine if you had to do that whenever changing pantsbuild/pants
enough-analyst-54434
08/16/2021, 7:15 PMenough-analyst-54434
08/16/2021, 7:17 PMenough-analyst-54434
08/16/2021, 7:20 PMenough-analyst-54434
08/16/2021, 7:22 PMwitty-crayon-22786
08/16/2021, 7:25 PMenough-analyst-54434
08/16/2021, 7:58 PMenough-analyst-54434
08/17/2021, 6:36 PMwitty-crayon-22786
08/17/2021, 6:52 PMwitty-crayon-22786
08/17/2021, 6:53 PM