Skip to content

Commit

Permalink
fix pip3 symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeixensperger committed Jun 18, 2024
1 parent b08dedf commit 57045ec
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions base/redhat-8/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ make altinstall LDFLAGS="-Wl,--strip-all"
rm -rf /tmp/pyinstall
ln -sf /usr/bin/python${PY_SHORT} /usr/bin/python
ln -sf /usr/bin/pip${PY_SHORT} /usr/bin/pip
ln -sf /usr/bin/python${PY_SHORT} /usr/bin/python3
ln -sf /usr/bin/pip${PY_SHORT} /usr/bin/pip3

# Install splunk-ansible dependencies
cd /
/usr/bin/python3.9 -m pip install --upgrade pip
pip -q --no-cache-dir install --upgrade "requests_unixsocket<2.29" "requests<2.29" six wheel Mako "urllib3<2.0.0" certifi jmespath future avro cryptography lxml protobuf setuptools ansible

# Avoid vulnerability on old pip version
/usr/libexec/platform-python -m pip install --upgrade pip

# Remove tests packaged in python libs
find /usr/lib/ -depth \( -type d -a -not -wholename '*/ansible/plugins/test' -a \( -name test -o -name tests -o -name idle_test \) \) -exec rm -rf '{}' \;
find /usr/lib/ -depth \( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) -exec rm -rf '{}' \;
Expand Down Expand Up @@ -111,7 +110,3 @@ echo "
# Clean
microdnf clean all
rm -rf /install.sh /anaconda-post.log /var/log/anaconda/*

# Symlink python/pip
ln -sf /usr/bin/python3.9 /usr/bin/python3
ln -sf /usr/bin/pip3.9 /usr/bin/pip3

0 comments on commit 57045ec

Please sign in to comment.