FROM debian:buster-20200908-slim as base
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-dev \
python3-pip \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install wheel==0.33.6 pip==20.2.3 setuptools==41.6.0
# Libhoney needs to be installed as a wheel since it otherwise crashes when
# trying to install poetry. Add --only-binary libhoney for this to work.
RUN python3 -m pip wheel --no-cache-dir --no-binary :all: libhoney
Collecting libhoney
Downloading libhoney-1.10.0.tar.gz (23 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /<venv-path>/bin/python3 /<venv-path>/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-build-env-zbg9fvr9/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=0.12'
cwd: None
Complete output (50 lines):
Collecting poetry>=0.12
Downloading poetry-1.0.10.tar.gz (168 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /<venv-path>/bin/python3 /<venv-path>/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/tmpq6u32apz
cwd: /private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-install-j5nvkvpk/poetry
Complete output (36 lines):
Traceback (most recent call last):
File "/<venv-path>/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/<venv-path>/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/<venv-path>/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-build-env-jae4uub_/overlay/lib/python3.7/site-packages/intreehooks.py", line 53, in get_requires_for_build_wheel
return self._backend.get_requires_for_build_sdist(config_settings)
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-build-env-jae4uub_/overlay/lib/python3.7/site-packages/intreehooks.py", line 38, in _backend
obj = self._module_from_dir(modname)
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-build-env-jae4uub_/overlay/lib/python3.7/site-packages/intreehooks.py", line 25, in _module_from_dir
mod = importlib.import_module(modname)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-install-j5nvkvpk/poetry/poetry/masonry/__init__.py", line 10, in <module>
from .builder import Builder
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-install-j5nvkvpk/poetry/poetry/masonry/builder.py", line 1, in <module>
from .builders.complete import CompleteBuilder
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-install-j5nvkvpk/poetry/poetry/masonry/builders/__init__.py", line 1, in <module>
from .complete import CompleteBuilder
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-install-j5nvkvpk/poetry/poetry/masonry/builders/complete.py", line 6, in <module>
from poetry.factory import Factory
File "/private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-install-j5nvkvpk/poetry/poetry/factory.py", line 10, in <module>
from clikit.api.io.io import IO
ModuleNotFoundError: No module named 'clikit'
----------------------------------------
ERROR: Command errored out with exit status 1: /<venv-path>/bin/python3 /<venv-path>/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/tmpq6u32apz Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.
You should consider upgrading via the '/<venv-path>/bin/python3 -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: /<venv-path>/bin/python3 /<venv-path>/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c8/080nx7hn0gn56zlp1ydzp3040000gn/T/pip-build-env-zbg9fvr9/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=0.12' Check the logs for full command output.
I'm not familiar with poetry so I'm not sure where exactly the issue lies, but what is confusing to me is that even if I pre-install poetry into the venv (which also installs clikit), it still fails to install libhoney from source afterwards.