famous-kilobyte-26155
04/30/2024, 9:05 PMbroad-processor-92400
05/01/2024, 2:55 AMfamous-kilobyte-26155
05/01/2024, 2:28 PMgo
famous-kilobyte-26155
05/01/2024, 2:32 PMbroad-processor-92400
05/01/2024, 10:54 PMdockerfile
library used in that docker_parser.pex
only publishes a few pre-built binary wheels: https://pypi.org/project/dockerfile/#files
• From https://github.com/asottile/dockerfile it looks like a from-source build indeed requires Go.
• This suggests to me that the dev container system can't use the binary wheels and so has to do the source build
Can you run these commands in the dev container and report what it says?
• python -c 'import platform; print(platform.platform())'
• pip install --no-cache dockerfile --target /tmp/
famous-kilobyte-26155
05/01/2024, 10:55 PMbroad-processor-92400
05/01/2024, 10:56 PMfamous-kilobyte-26155
05/01/2024, 11:51 PMfamous-kilobyte-26155
05/01/2024, 11:52 PMCollecting dockerfile
Downloading dockerfile-3.3.1.tar.gz (6.9 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dockerfile
Building wheel for dockerfile (setup.py) ... done
Created wheel for dockerfile: filename=dockerfile-3.3.1-cp311-abi3-linux_aarch64.whl size=1879429 sha256=023090800059de7e44853c4ac68315fbc2dc6701f491b162494f0c5e5a0c90af
Stored in directory: /tmp/pip-ephem-wheel-cache-4rbfmvz8/wheels/e7/b7/90/df4e847fa0948a16694b14c544246ea110f4029bd2995c7e7b
Successfully built dockerfile
Installing collected packages: dockerfile
Successfully installed dockerfile-3.3.1
famous-kilobyte-26155
05/01/2024, 11:52 PMfamous-kilobyte-26155
05/01/2024, 11:52 PMCollecting dockerfile
Downloading dockerfile-3.3.1.tar.gz (6.9 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dockerfile
Building wheel for dockerfile (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
/usr/local/lib/python3.11/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
running bdist_wheel
running build
running build_ext
$ GOPATH=/tmp/tmp1u_f7pm_ go get -d
error: [Errno 2] No such file or directory: 'go'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dockerfile
Running setup.py clean for dockerfile
Failed to build dockerfile
ERROR: Could not build wheels for dockerfile, which is required to install pyproject.toml-based projects
broad-processor-92400
05/01/2024, 11:58 PMdockerfile
indeed doesn't publish a binary wheel for. So, I think possible paths forward are:
Immediate term:
1. just install Go so that the package can be built from source, as you've done
2. build the requisite wheel yourself separately (and e.g. put it in a private registry or on disk somewhere), create a resolve that installs that, and use [dockerfile-parser].install_from_resolve
to have Pants use that one
Longer term:
1. work with dockerfile
upstream to also publish Linux ARM wheels
2. find a different dockerfile parser library for the pants.backend.docker
backend to use (and contribute that change 🙂 )famous-kilobyte-26155
05/02/2024, 12:08 AMbroad-processor-92400
05/02/2024, 6:30 AM