late-keyboard-89314
12/20/2022, 9:06 PM2.16.0.dev3
):
stderr:
There was 1 error downloading required artifacts:
1. dockerfile 3.2 from <https://files.pythonhosted.org/packages/6e/75/1395fac29bd2dcccb51ffae11ba9a19fe159eabf9596bca4cf49c1a2b191/dockerfile-3.2.0.tar.gz>
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
This seems to be coming from bootstrapping the docker backend. Where can I find the logs of this process to keep troubleshooting? I’ve got --keep-sandboxes=on_failure
set.happy-kitchen-89482
12/21/2022, 2:18 AM-ldebug
and see if that gives more info?enough-analyst-54434
12/21/2022, 5:45 AM--preserve-pip-download-log
to Pex. It will print the path to stderr and retain it.happy-kitchen-89482
12/21/2022, 6:07 AMlate-keyboard-89314
12/21/2022, 2:30 PMhappy-kitchen-89482
12/21/2022, 3:48 PM-ldebug
. And I wonder if this has to do with Python versions/interpreter constraintsdockerfile
on an unsuitable interpreter somehowlate-keyboard-89314
12/21/2022, 3:52 PM-ldebug
and `--print-stacktrace`: https://gist.github.com/jcrumb-u21/7163d47b523c4753c9b8f13a80582ce1enough-analyst-54434
12/21/2022, 3:56 PMlate-keyboard-89314
12/21/2022, 3:57 PMenough-analyst-54434
12/21/2022, 3:58 PMlate-keyboard-89314
12/21/2022, 4:04 PMenv -i.
enough-analyst-54434
12/21/2022, 4:04 PMhappy-kitchen-89482
12/21/2022, 4:05 PMlate-keyboard-89314
12/21/2022, 4:05 PMpip install dockerfile
will pull a wheel on macOS ARM, and pip install --no-binary :all: dockerfile
worked for me as well. Trying it now under env -i
to see if GO_ROOT
is the problem.happy-kitchen-89482
12/21/2022, 4:05 PMenough-analyst-54434
12/21/2022, 4:06 PMlate-keyboard-89314
12/21/2022, 4:06 PMdockerfile-3.2.0-cp38-abi3-macosx_12_0_arm64.whl
enough-analyst-54434
12/21/2022, 4:06 PMpackaging
bug re this.late-keyboard-89314
12/21/2022, 4:11 PMdockerfile
with the same interpreter pants selected.enough-analyst-54434
12/21/2022, 4:13 PM--keep-sandboxes=on_failure
was correct. You need to poke at the __run.sh
script there and get your hands dirty finding out what's different. Editing that script will allow insertion of things like --preserve-pip-download-log
, etc.10:49:30.95 [DEBUG] spawned local process as Some(75453) for Process { argv: ["/Users/jay/.pyenv/versions/3.7.11/bin/python3.7", "./pex", "--tmpdir", ".tmp", "--jobs", "6", "--pip-version", "20.3.4-patched", ...
Says you're not using it for the [python] pip_version = "22.3"
feature.packaging
, etc.GO*
in it's env; so ignoring why the abi3 wheel is not getting selected, that explains why the sdist fails to build I think.__run.sh
keep in mind that it is not hermetic like the actual Pants process execution is. It will leak through your environment! So if the __run.sh
command works, try then blanking out select env vars and seeing if it still works, although this may be complicated by successful caching of wheel builds in ~/.cache/named_caches/pex_root/
late-keyboard-89314
12/21/2022, 4:35 PMWhy are you using Pants 2.16.x?I need a bugfix that hasn’t hit the 2.14/2.15 release branches yet.
If you really need to be using Python 3.7I don’t need to be using Python 3.7 at all, it just happens to be on my system and is what pants is selecting when installing this tool. This project actually doesn’t use Python at all at the moment, and the backend isn’t enabled:
[GLOBAL]
pants_version = "2.16.0.dev3"
backend_packages = [
"pants.backend.experimental.go",
"pants.backend.docker",
]
It would be perfectly fine in my case for pants to select python 3.8 and use the wheel for this package.enough-analyst-54434
12/21/2022, 4:39 PM[dockerfile-parser]
interpreter_constraints = ["CPython>=3.7,<4"]
lockfile = "anywhere/you/want/dockerfile-anyname-really.lock-but-any-extension-or-none
The 2 things to change there are:
1. The ICs: I presented the default, and that's what's killing you. You probably want to change <4
to at least `<3.12`but the tighter the better on the upper bound and clearly you want to bump the lower bound.
2. The lockfile path: as should be obvious
Then run ./pants generate-lockfiles --resolve dockerfile-parser
, then try to use Pants again.>=3.7,<3.10
since the tool does not care about any user Python code, its just a tool to be used internally by rules.late-keyboard-89314
12/21/2022, 4:50 PM>=3.8
and it worked (presumably because it pulled the wheel). I have such a love-hate thing going with ARM Macs.enough-analyst-54434
12/21/2022, 4:51 PMlate-keyboard-89314
12/21/2022, 4:51 PMenough-analyst-54434
12/21/2022, 4:52 PMhappy-kitchen-89482
12/21/2022, 4:58 PMenough-analyst-54434
12/21/2022, 4:59 PM