Commit 43a93029 authored by Vitaly Lipatov's avatar Vitaly Lipatov

repack.d/generic.sh: install rpm-build-python3 for build packages with python code

parent c9ad060c
......@@ -3,6 +3,8 @@
BUILDROOT="$1"
SPEC="$2"
flag_python3=''
for i in lib/python3 lib/python2.7 ; do
t=$i
if [ -d $BUILDROOT/usr/$i/dist-packages ] ; then
......@@ -10,3 +12,16 @@ for i in lib/python3 lib/python2.7 ; do
subst "s|/usr/$i/dist-packages|/usr/$t/site-packages|" $SPEC
fi
done
for i in $BUILDROOT/usr/bin/* ; do
[ -f "$i" ] || continue
grep -q '^#!/usr/bin/python' $i && flag_python3=1
subst 's|^#!/usr/bin/python$|#!/usr/bin/python3|' $i
done
# check for .py scripts
find $BUILDROOT -name "*.py" | grep -q "\.py$" && flag_python3=1
if [ -n "$flag_python3" ] ; then
epm install --skip-installed rpm-build-python3
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment