quiet-dentist-42775
10/04/2023, 4:13 AMhappy-kitchen-89482
10/04/2023, 4:20 AMquiet-dentist-42775
10/04/2023, 4:21 AMenough-analyst-54434
10/04/2023, 4:24 AMls -l dist/.../main_app.pex
(the path of the result of pants package ...
?enough-analyst-54434
10/04/2023, 4:26 AMand all the packages are installed on both computersKind of the whole point of a PEX file is that doesn't matter - the PEX contains all the files it needs except only for the Python interpreter.
quiet-dentist-42775
10/04/2023, 4:27 AMenough-analyst-54434
10/04/2023, 4:28 AMls
output to start. Once you have a PEX file, Pants or your repo's use of it don't matter any more.enough-analyst-54434
10/04/2023, 4:30 AMhead -1 dist/.../main_app.pex
.quiet-dentist-42775
10/04/2023, 4:30 AMenough-analyst-54434
10/04/2023, 4:30 AMhead ...
command)?quiet-dentist-42775
10/04/2023, 4:30 AMenough-analyst-54434
10/04/2023, 4:31 AM/usr/bin/env python3.11
on their machine and see what happens.enough-analyst-54434
10/04/2023, 4:32 AMquiet-dentist-42775
10/04/2023, 4:32 AMenough-analyst-54434
10/04/2023, 4:32 AMenough-analyst-54434
10/04/2023, 4:33 AMquiet-dentist-42775
10/04/2023, 4:33 AMquiet-dentist-42775
10/04/2023, 4:33 AMenough-analyst-54434
10/04/2023, 4:33 AMenough-analyst-54434
10/04/2023, 4:34 AMenough-analyst-54434
10/04/2023, 4:34 AMchmod +x main_app.pex
on the boss machine is required.enough-analyst-54434
10/04/2023, 4:35 AMpython main_app.pex
quiet-dentist-42775
10/04/2023, 4:35 AMenough-analyst-54434
10/04/2023, 4:35 AMenough-analyst-54434
10/04/2023, 4:35 AMquiet-dentist-42775
10/04/2023, 4:36 AMenough-analyst-54434
10/04/2023, 4:36 AMenough-analyst-54434
10/04/2023, 4:36 AMquiet-dentist-42775
10/04/2023, 4:37 AMquiet-dentist-42775
10/04/2023, 4:37 AMquiet-dentist-42775
10/04/2023, 6:04 AMquiet-dentist-42775
10/04/2023, 6:06 AMenough-analyst-54434
10/04/2023, 6:12 AMquiet-dentist-42775
10/04/2023, 6:19 AMfmt
goal
IntrinsicError: Failed to read link "/home/jay/Desktop/pants/pants-practice/venv/bin/python": Absolute symlink: "/usr/bin/python3.11"
and same for package
114453.29 [ERROR] 1 Exception encountered:
Engine traceback:
in package
goal
and all these commands work perfectly in another project with same build files same .tomlenough-analyst-54434
10/04/2023, 6:20 AMquiet-dentist-42775
10/04/2023, 6:20 AMenough-analyst-54434
10/04/2023, 6:21 AMenough-analyst-54434
10/04/2023, 6:21 AM.gitignore
file. If the venv dir should in fact be gitignored but you haven't done so, then that is your fix.enough-analyst-54434
10/04/2023, 6:22 AMquiet-dentist-42775
10/04/2023, 6:23 AMenough-analyst-54434
10/04/2023, 6:24 AMenough-analyst-54434
10/04/2023, 6:25 AMdist/
and this initial setup advice for the Pants repo has you covered: https://www.pantsbuild.org/docs/initial-configuration#update-gitignoreenough-analyst-54434
10/04/2023, 6:25 AMquiet-dentist-42775
10/04/2023, 6:27 AMenough-analyst-54434
10/04/2023, 6:29 AMenough-analyst-54434
10/04/2023, 6:30 AMquiet-dentist-42775
10/04/2023, 6:32 AMenough-analyst-54434
10/04/2023, 6:34 AMevery python package i installYou install 0 packages. Pants installs them and it does so in many (many, many!!) small, exact fit venvs.
enough-analyst-54434
10/04/2023, 6:34 AMquiet-dentist-42775
10/04/2023, 6:34 AMenough-analyst-54434
10/04/2023, 6:35 AMenough-analyst-54434
10/04/2023, 6:36 AMquiet-dentist-42775
10/04/2023, 6:38 AMenough-analyst-54434
10/04/2023, 6:44 AMexample-*
repos: https://github.com/search?q=org%3Apantsbuild+%2Frepo%3Aexample-.*%2F&type=repositories&ref=advsearchquiet-dentist-42775
10/04/2023, 6:45 AMquiet-dentist-42775
10/04/2023, 6:45 AMquiet-dentist-42775
10/10/2023, 10:15 AMpex_binary(
name="app_linux",
entry_point="app.py",
dependencies=[
":auth_package",
],
output_path="auth/app_linux.pex",
platforms=["linux-x86_64-cp-311-cp311"],
interpreter_constraints=["CPython==3.11.5"],
)
same pex_binary for "windows-x86_64-cp-311-cp311"
windows one does not get created only and the linux one gets created but says you need 3.9 to run pex file...enough-analyst-54434
10/10/2023, 6:04 PMpex_binary
targeting Linux, if you build the Pex on Linux with CPython 3.11.5 present, there is generally no need to specify platforms
at all. If not, say you're on Mac building a PEX for Linux or on Linux building a PEX for Mac; then use complete_platforms
instead of platforms
and generate a complete platform JSON platform descriptor on the machine you wish to run the PEX on as described here: https://www.pantsbuild.org/docs/reference-pex_binary#codecomplete_platformscodequiet-dentist-42775
10/11/2023, 6:37 AM