optimization code

This commit is contained in:
薄皮小笼包 2020-08-31 22:14:48 +08:00 committed by Gitee
parent 9a4ca50c29
commit 5368daf344

View File

@ -49,15 +49,14 @@ fi
cd %{python3_sitelib}/packageship/
if [ -f "/usr/bin/pyinstaller" ]; then
path=/usr/bin/pyinstaller
/usr/bin/pyinstaller -F pkgship.py
elif [ -f "/usr/local/bin/pyinstaller" ]; then
path=/usr/local/bin/pyinstaller
/usr/local/bin/pyinstaller -F pkgship.py
else
echo "pkship install fail,there is no pyinstaller!"
exit
fi
$path -F pkgship.p
sed -i "s/hiddenimports\=\[\]/hiddenimports\=\['pkg_resources.py2_warn'\]/g" pkgship.spec
$path pkgship.spec
cp dist/pkgship /usr/bin/