python-build-standalone
python-build-standalone copied to clipboard
Fails to build on docker 17.05 in Linux
Seems like image id can't be detected with those lines https://github.com/indygreg/python-build-standalone/blob/master/cpython-linux/build.py#L58-L64
Maybe build image with predefined tag? Also docker build returns Image object with proper Id there https://docker-py.readthedocs.io/en/stable/images.html#docker.models.images.Image Maybe use it?
I believe the docker-py API doesn't return the image ID when streaming build output: the function either returns a data structure or is a generator of output chunks. But I could be wrong here...
I suppose I can install Docker 17.05 and modify the code to parse the image ID from it.
Just to rule it out, are you using English? It is possible Docker is using non-English to print the image ID during build...
OS has English locale and no other languages are installed. I will test with latest 18.09 docker and update the issue.
Here's output from 18.09
gdbm-linux64> make[2]: Nothing to be done for `install-exec-am'.
gdbm-linux64> make[2]: Nothing to be done for `install-data-am'.
gdbm-linux64> make[2]: Leaving directory `/build/gdbm-1.18.1'
gdbm-linux64> make[1]: Leaving directory `/build/gdbm-1.18.1'
/mnt/cpython-linux/build.py --platform linux64 libedit
downloading https://www.thrysoee.dk/editline/libedit-20181209-3.1.tar.gz to /mnt/build/libedit-20181209-3.1.tar.gz
successfully downloaded https://www.thrysoee.dk/editline/libedit-20181209-3.1.tar.gz
libedit-linux64> copying /mnt/build/binutils-linux64.tar to container
libedit-linux64> copying /mnt/build/clang-linux64.tar to container
Traceback (most recent call last):
File "/mnt/cpython-linux/build.py", line 701, in <module>
sys.exit(main())
File "/mnt/cpython-linux/build.py", line 680, in main
build_libedit(client, get_image(client, 'build'), platform=args.platform)
File "/mnt/cpython-linux/build.py", line 326, in build_libedit
install_tools_archive(container, BUILD / ('ncurses-%s.tar' % platform))
File "/mnt/cpython-linux/build.py", line 162, in install_tools_archive
copy_file_to_container(source, container, '/build')
File "/mnt/cpython-linux/build.py", line 120, in copy_file_to_container
tf.add(str(path), archive_path or path.name)
File "/usr/local/lib/python3.7/tarfile.py", line 1928, in add
tarinfo = self.gettarinfo(name, arcname)
File "/usr/local/lib/python3.7/tarfile.py", line 1807, in gettarinfo
statres = os.lstat(name)
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/build/ncurses-linux64.tar'
Makefile:53: recipe for target '/mnt/build/libedit-linux64.tar' failed
make: *** [/mnt/build/libedit-linux64.tar] Error 1
rm /mnt/build/image-build.tar
I fixed the editline build failure. But the Docker failure is still open.