From ade6a46c12de8d73a88d8aab74b6db85e293363d Mon Sep 17 00:00:00 2001 From: Andrew Quijano Date: Tue, 10 Dec 2024 14:42:02 -0500 Subject: [PATCH] Remove duplicate pip installs, centalize all dependancy information --- Dockerfile | 5 +---- panda/dependencies/ubuntu_18.04_base.txt | 3 ++- panda/dependencies/ubuntu_20.04_base.txt | 3 ++- panda/dependencies/ubuntu_22.04_base.txt | 3 ++- panda/scripts/install_ubuntu.sh | 9 ++++----- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index da5748372f1..c9d38b99aa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,7 @@ RUN [ -e /tmp/build_dep.txt ] && \ apt-get -qq update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*') && \ apt-get clean && \ - python3 -m pip install --upgrade --no-cache-dir pip && \ - python3 -m pip install --upgrade --no-cache-dir "cffi>1.14.3" && \ - python3 -m pip install --upgrade --no-cache-dir "capstone" && \ + python3 -m pip install "cffi>1.14.3" && \ curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal # Then install capstone from source @@ -91,7 +89,6 @@ RUN make -C /panda/build install && \ # Install pypanda RUN cd /panda/panda/python/core && \ PRETEND_VERSION=$(cat /tmp/savedversion) python3 setup.py install -RUN python3 -m pip install --ignore-install pycparser && python3 -m pip install --force-reinstall --no-binary :all: cffi # Build a whl too RUN cd /panda/panda/python/core && \ PRETEND_VERSION=$(cat /tmp/savedversion) python3 setup.py bdist_wheel diff --git a/panda/dependencies/ubuntu_18.04_base.txt b/panda/dependencies/ubuntu_18.04_base.txt index e4605e2ba9f..13328881c93 100644 --- a/panda/dependencies/ubuntu_18.04_base.txt +++ b/panda/dependencies/ubuntu_18.04_base.txt @@ -18,11 +18,12 @@ unzip # pyperipheral (only needed for armel) libpython3-dev -# pypanda dependencies +# panda python dependencies genisoimage libffi-dev python3-protobuf python3-colorama +python3-capstone # apt-rdepends qemu-system-common acl diff --git a/panda/dependencies/ubuntu_20.04_base.txt b/panda/dependencies/ubuntu_20.04_base.txt index 7b043e8c3ed..6d2eb6624d7 100644 --- a/panda/dependencies/ubuntu_20.04_base.txt +++ b/panda/dependencies/ubuntu_20.04_base.txt @@ -17,11 +17,12 @@ wget # pyperipheral (only needed for armel) libpython3-dev -# pypanda dependencies +# panda python dependencies genisoimage libffi-dev python3-protobuf python3-colorama +python3-capstone # Not sure what this one is needed for liblzo2-2 diff --git a/panda/dependencies/ubuntu_22.04_base.txt b/panda/dependencies/ubuntu_22.04_base.txt index ed4549b4cfe..ddf261d6979 100644 --- a/panda/dependencies/ubuntu_22.04_base.txt +++ b/panda/dependencies/ubuntu_22.04_base.txt @@ -17,11 +17,12 @@ wget # pyperipheral (only needed for armel) libpython3-dev -# pypanda dependencies +# panda python dependencies genisoimage libffi-dev python3-protobuf python3-colorama +python3-capstone # Not sure what this one is needed for liblzo2-2 diff --git a/panda/scripts/install_ubuntu.sh b/panda/scripts/install_ubuntu.sh index 73b853e7281..4347909bffe 100755 --- a/panda/scripts/install_ubuntu.sh +++ b/panda/scripts/install_ubuntu.sh @@ -126,11 +126,6 @@ if [[ !$(dpkg -l | grep -q libosi) ]]; then popd fi -# PyPANDA needs CFFI from pip (the version in apt is too old) -# Install system-wide since PyPANDA install will also be system-wide -$SUDO python3 -m pip install pip -$SUDO python3 -m pip install "cffi>1.14.3" - progress "Trying to update DTC submodule" git submodule update --init dtc || true @@ -139,6 +134,10 @@ if [ -d "build" ]; then rm -rf "build" fi +# PyPANDA needs CFFI from pip (the version in apt is too old) +# Install system-wide since PyPANDA install will also be system-wide +$SUDO python3 -m pip install "cffi>1.14.3" + progress "Building PANDA..." mkdir build pushd build