Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken MacOS and Ubuntu18.04 runs. #4517

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ ply==3.11
ptf==0.9.4
scapy==2.5.0
clang-format==18.1.0
black==24.2.0
isort==5.13.2
isort==5.13.2; python_version > '3.6'
black==24.2.0; python_version > '3.6'
protobuf==3.20.2; python_version > '3.6'
grpcio==1.59.3; python_version > '3.6'
googleapis-common-protos==1.53.0; python_version > '3.6'
# Ubuntu 18.04 uses Python 3.6, which is not supported by recent versions of Protobuf.
# Ubuntu 18.04 uses Python 3.6, which is not supported by recent versions of Protobuf and Black.
protobuf==3.19.2; python_version <= '3.6'
googleapis-common-protos==1.53.0; python_version <= '3.6'
grpcio==1.48.2; python_version <= '3.6'
isort==5.10.1; python_version <= '3.6'
black==22.8.0; python_version <= '3.6'
7 changes: 5 additions & 2 deletions tools/install_mac_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ REQUIRED_PACKAGES=(
${BOOST_LIB}
)
for package in "${REQUIRED_PACKAGES[@]}"; do
brew_install ${package}
# FIXME: || true should not be needed but because boost@1.84 pulls in python@3.12, which fails
# to install we need to ignore the error.
brew_install ${package} || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know which package has /usr/local/bin/2to3?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is the Python package.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried a couple things, including removing 2to3 but there are more files it conflicts with. Even when you install python@3.12 beforehand, the boost installation tries to pull it in again and fails. Maybe there is a convenient flag to deal with that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like known issue: actions/runner-images#4020 Some solutions are quite harsh: Gelmo/warfork-qfusion@79f3dd0

done

# Check if linking is needed.
Expand All @@ -62,4 +64,5 @@ fi
source ~/.bash_profile

# Install required pip packages
pip3 install --user -r requirements.txt
# TODO: Should we use --break-system-packages or should we set up a venv?
pip3 install --user --break-system-packages -r requirements.txt
Loading