Why I did it
Fix the armhf build failure.
How to reproduce the issue:
docker run -it debain:bullseye bash
apt-get update && apt-get install -y python3-pip
pip3 install PyYAML==5.4.1
Error message:
Collecting PyYAML==5.4.1
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmp6xabslgb_in_process.py get_requires_for_build_wheel /tmp/tmp_er01ztl
....
raise AttributeError(attr)
AttributeError: cython_sources
----------------------------------------
WARNING: Discarding d63f2d7597/PyYAML-5.4.1.tar.gz (sha256)
=607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e (from https://pypi.org/simple/pyyaml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp6xabslgb_in_process.py get_requires_for_build_wheel /tmp/tmp_er01ztl Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyYAML==5.4.1
ERROR: No matching distribution found for PyYAML==5.4.1
root@fa2fa92edcfd:/#
But if adding the option --no-build-isolation, then it is good, see fix.
install "PyYAML==5.4.1" --no-build-isolation
The same error can be found in the multiple builds.
Work item tracking
Microsoft ADO (number only): 24567457
How I did it
Add a build option --no-build-isolation.
This commit is contained in:
parent
1243a6e2f9
commit
d0648f81c7
@ -512,6 +512,9 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docke
|
||||
# Install scapy
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'scapy==2.4.4'
|
||||
|
||||
# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'PyYAML==5.4.1' --no-build-isolation
|
||||
|
||||
## Note: keep pip installed for maintainance purpose
|
||||
|
||||
# Install GCC, needed for building/installing some Python packages
|
||||
|
@ -23,6 +23,10 @@ RUN apt-get install -y \
|
||||
RUN pip3 install pyangbind==0.8.1
|
||||
RUN pip3 uninstall -y enum34
|
||||
|
||||
# Fix armhf build failure
|
||||
# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
|
||||
RUN pip3 install PyYAML==5.4.1 --no-build-isolation
|
||||
|
||||
{% if docker_config_engine_bullseye_debs.strip() %}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_config_engine_bullseye_debs.split(' '), "/debs/") }}
|
||||
|
@ -23,6 +23,10 @@ RUN apt-get install -y \
|
||||
RUN pip3 install pyangbind==0.8.1
|
||||
RUN pip3 uninstall -y enum34
|
||||
|
||||
# Fix armhf build failure
|
||||
# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
|
||||
RUN pip3 install PyYAML==5.4.1 --no-build-isolation
|
||||
|
||||
{% if docker_config_engine_buster_debs.strip() %}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_config_engine_buster_debs.split(' '), "/debs/") }}
|
||||
|
@ -434,7 +434,9 @@ RUN pip3 uninstall -y enum34
|
||||
RUN pip3 install j2cli==0.3.10
|
||||
|
||||
# For sonic-mgmt-framework
|
||||
RUN pip3 install "PyYAML==5.4.1"
|
||||
# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
|
||||
RUN pip3 install "PyYAML==5.4.1" --no-build-isolation
|
||||
|
||||
RUN pip3 install "lxml==4.9.1"
|
||||
|
||||
# For sonic-platform-common testing
|
||||
|
@ -459,8 +459,10 @@ RUN pip3 install MarkupSafe==2.0.1
|
||||
RUN pip3 install Jinja2==3.0.3
|
||||
|
||||
# For sonic-mgmt-framework
|
||||
RUN pip2 install "PyYAML==5.4.1"
|
||||
RUN pip3 install "PyYAML==5.4.1"
|
||||
# The option --no-build-isolation can be removed when upgrading PyYAML to 6.0.1
|
||||
RUN pip2 install "PyYAML==5.4.1" --no-build-isolation
|
||||
RUN pip3 install "PyYAML==5.4.1" --no-build-isolation
|
||||
|
||||
RUN pip2 install "lxml==4.9.1"
|
||||
RUN pip3 install "lxml==4.9.1"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user