Skip to content

Commit ade6a46

Browse files
committed
Remove duplicate pip installs, centalize all dependancy information
1 parent cc88392 commit ade6a46

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ RUN [ -e /tmp/build_dep.txt ] && \
2929
apt-get -qq update && \
3030
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*') && \
3131
apt-get clean && \
32-
python3 -m pip install --upgrade --no-cache-dir pip && \
33-
python3 -m pip install --upgrade --no-cache-dir "cffi>1.14.3" && \
34-
python3 -m pip install --upgrade --no-cache-dir "capstone" && \
32+
python3 -m pip install "cffi>1.14.3" && \
3533
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
3634

3735
# Then install capstone from source
@@ -91,7 +89,6 @@ RUN make -C /panda/build install && \
9189
# Install pypanda
9290
RUN cd /panda/panda/python/core && \
9391
PRETEND_VERSION=$(cat /tmp/savedversion) python3 setup.py install
94-
RUN python3 -m pip install --ignore-install pycparser && python3 -m pip install --force-reinstall --no-binary :all: cffi
9592
# Build a whl too
9693
RUN cd /panda/panda/python/core && \
9794
PRETEND_VERSION=$(cat /tmp/savedversion) python3 setup.py bdist_wheel

panda/dependencies/ubuntu_18.04_base.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ unzip
1818
# pyperipheral (only needed for armel)
1919
libpython3-dev
2020

21-
# pypanda dependencies
21+
# panda python dependencies
2222
genisoimage
2323
libffi-dev
2424
python3-protobuf
2525
python3-colorama
26+
python3-capstone
2627

2728
# apt-rdepends qemu-system-common
2829
acl

panda/dependencies/ubuntu_20.04_base.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ wget
1717
# pyperipheral (only needed for armel)
1818
libpython3-dev
1919

20-
# pypanda dependencies
20+
# panda python dependencies
2121
genisoimage
2222
libffi-dev
2323
python3-protobuf
2424
python3-colorama
25+
python3-capstone
2526

2627
# Not sure what this one is needed for
2728
liblzo2-2

panda/dependencies/ubuntu_22.04_base.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ wget
1717
# pyperipheral (only needed for armel)
1818
libpython3-dev
1919

20-
# pypanda dependencies
20+
# panda python dependencies
2121
genisoimage
2222
libffi-dev
2323
python3-protobuf
2424
python3-colorama
25+
python3-capstone
2526

2627
# Not sure what this one is needed for
2728
liblzo2-2

panda/scripts/install_ubuntu.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ if [[ !$(dpkg -l | grep -q libosi) ]]; then
126126
popd
127127
fi
128128

129-
# PyPANDA needs CFFI from pip (the version in apt is too old)
130-
# Install system-wide since PyPANDA install will also be system-wide
131-
$SUDO python3 -m pip install pip
132-
$SUDO python3 -m pip install "cffi>1.14.3"
133-
134129
progress "Trying to update DTC submodule"
135130
git submodule update --init dtc || true
136131

@@ -139,6 +134,10 @@ if [ -d "build" ]; then
139134
rm -rf "build"
140135
fi
141136

137+
# PyPANDA needs CFFI from pip (the version in apt is too old)
138+
# Install system-wide since PyPANDA install will also be system-wide
139+
$SUDO python3 -m pip install "cffi>1.14.3"
140+
142141
progress "Building PANDA..."
143142
mkdir build
144143
pushd build

0 commit comments

Comments
 (0)