Hey all - question with respect to 2.11 pex genera...
# general
r
Hey all - question with respect to 2.11 pex generated lockfiles. We are using a custom repo to include a couple of pre-built wheels
Copy code
[python-repos]
repos = ["%(buildroot)s/3rdparty/python/wheel"]
The pex-generated lockfile uses absolute paths for these requirements.
Copy code
"artifacts": [
            {
              "algorithm": "sha256",
              "hash": "4f466cac7573b22e49df3749c5a49bdd58e840b18a1c02e3311d0c7561d28216",
              "url": "file:///home/dave/<omitted>/3rdparty/python/wheel/PyFMI-2.8.2-cp38-cp38-linux_x86_64.whl"
            }
          ],
This obviously causes errors once the lockfile is used on another machine. Any advice on how to handle this case?
1
h
Interesting. There may be a better solution than this, but could you host those artifacts somewhere online instead?
r
That should work 👍
w
there is a well documented open PEX issue for this: it’s something that we’d like to support: https://github.com/pantsbuild/pex/issues/1413
but there is a lot of other 2.11.x stabilization work happening, so unlikely that that one will make it into 2.11.x without a volunteer to tackle it
r
Ah thanks for the link to the issue. Not a big deal on my end just didn't know if I was overlooking an existing solution
b
@rhythmic-battery-45198 is this ?
r
@bitter-ability-32190 - I’ve got a very clear answer to my question. Haven’t hosted the wheels yet on my end
👍 1
I went back to double check if I still needed to pre-build the wheel. The root issue was that the package is only distributed as an sdist, and a pip install option is required to build from source. I came to the conclusion that arbitrary pip options are not supported after searching GitHub issues. Looks like targeted support for the similar —no-binary flag was recently added.
So I think I’m back to needing to host the pre built wheel
e
Direct support for portable local find-links directories in locks will be available shortly: https://github.com/pantsbuild/pex/pull/1716 - not sure if this goes into Pants 2.11.x, but it will be in 2.12.x. It turns out I needed to have this working to get support for locking local source projects working to round out the recently added support for VCS requirement locking.
r
Awesome - thanks for the note!