Есть программа Yatube. Как ее собрать?
Собираю в контейнере:
debootstrap --arch=amd64 bionic bionic-chroot
mkdir bionic-chroot/root/binaries
mkdir bionic-chroot/root/binaries/appimage
mkdir bionic-chroot/root/bin
cp appimagetool-x86_64.AppImage bionic-chroot/root/binaries/appimage/
cp -a /mnt/hdd/BACKUP/repos/Yatube/ bionic-chroot/root/bin
root@bionic-chroot:~/bin/Yatube# ls *
build:
Linux Wine
docs:
BUGS CHANGELOG-RU LICENSE PROGRAMMER README-RU patterns
CHANGELOG-EN INSTALL NOT-A-BUG README-EN TODOS
resources:
buttons icon_64x64_yatube.gif info.gif nopic.png transl.po
error.gif icon_64x64_yatube.ico locale question.gif warning.gif
src:
db.py gui.py logic.py meta.py tests.py utils.py yatube.py
root@bionic-chroot:~/bin/Yatube# cat build/Linux/create_appimage_x86-64.sh
#!/bin/bash
product="Yatube"
productlow='yatube'
arch="x86_64"
os="Linux" # Linux or Wine
oslow="linux"
# oldstable debian has glibc 2.19, whereas current stable debian has glibc 2.24
glibc="2.27"
binariesdir="$HOME/binaries"
appimagedir="$binariesdir/appimage"
srcdir="$HOME/bin/$product/src"
resdir="$HOME/bin/$product/resources"
tmpdir="/tmp/$product" # Will be deleted!
builddir="$tmpdir/build" # Will be deleted!
pildir="/usr/local/lib/python3.4/dist-packages/PIL"
export "ARCH=$arch"
if [ "`which pyinstaller`" = "" ]; then
echo "pyinstaller is not installed!"; exit
fi
if [ ! -d "$pildir" ]; then
echo "Folder $pildir does not exist!"; exit
fi
if [ ! -d "$binariesdir/$product" ]; then
echo "Folder $binariesdir/$product does not exist!"; exit
fi
if [ ! -d "$appimagedir" ]; then
echo "Folder $appimagedir does not exist!"; exit
fi
if [ ! -d "$srcdir" ]; then
echo "Folder $srcdir does not exist!"; exit
fi
if [ ! -d "$resdir" ]; then
echo "Folder $resdir does not exist!"; exit
fi
if [ ! -e "$appimagedir/AppRun-$arch" ]; then
echo "File $appimagedir/AppRun-$arch does not exist!"; exit
fi
if [ ! -e "$appimagedir/appimagetool-$arch.AppImage" ]; then
echo "File $appimagedir/appimagetool-$arch.AppImage does not exist!"; exit
fi
if [ ! -e "$HOME/bin/$product/build/$os/$productlow.desktop" ]; then
echo "File $HOME/bin/$product/build/$os/$productlow.desktop does not exist!"; exit
fi
if [ ! -e "$HOME/bin/$product/build/$os/$productlow.png" ]; then
echo "File $HOME/bin/$product/build/$os/$productlow.png does not exist!"; exit
fi
# Build with pyinstaller
rm -rf "$tmpdir"
mkdir -p "$builddir" "$tmpdir/app/usr/bin" "$tmpdir/app/resources"
cp -r "$srcdir"/* "$builddir"
cp -r "$resdir" "$tmpdir/app/usr"
cp -r "$resdir/locale" "$tmpdir/app/resources/"
cp -r "$pildir" "$tmpdir/app/usr/bin"
cd "$builddir"
pyinstaller "$productlow.py"
# Create AppImage
mv "$builddir/dist/$productlow"/* "$tmpdir/app/usr/bin"
cd "$tmpdir/app"
cp "$appimagedir/AppRun-$arch" "$tmpdir/app/AppRun"
cp "$appimagedir/appimagetool-$arch.AppImage" "$tmpdir"
cp "$HOME/bin/$product/build/$os/$productlow.desktop" "$tmpdir/app"
cp "$HOME/bin/$product/build/$os/$productlow.png" "$tmpdir/app"
cd "$tmpdir"
./appimagetool-$arch.AppImage app
read -p "Update the AppImage? (Y/n) " choice
if [ "$choice" = "n" ] || [ "$choice" = "N" ]; then
exit;
fi
mv -fv "$tmpdir/$product-$arch.AppImage" "$HOME/binaries/$product/$productlow-$oslow-$arch-glibc$glibc.AppImage"
#rm -rf "$tmpdir"
mkdir /root/binaries/Yatube
nano /root/binaries/appimage/AppRun-x86_64
#!/bin/bash
/usr/bin/yatube
apt install python3 zlib1g libjpeg8 python3-tk appstream-util \
> curl
apt install python3-pip libfuse2 fuse
apt install libtiff5-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev tcl8.6-dev tk8.6-dev
apt install libjpeg62-dev
pip3 install Pillow google-api-python-client oauth2client google \
configparser youtube-dl
root@bionic-chroot:~/bin/Yatube# pip3 install Pillow google-api-python-client oauth2client google \
> configparser youtube-dl
Collecting Pillow
Using cached https://files.pythonhosted.org/packages/7d/2a/2fc11b54e2742db06297f7fa7f420a0e3069fdcf0e4b57dfec33f0b08622/Pillow-8.4.0.tar.gz
Collecting google-api-python-client
Using cached https://files.pythonhosted.org/packages/75/ff/cf2237867061a33c3c5525a784fa16f863c58c4c87a57833833c611ea33d/google_api_python_client-2.52.0-py2.py3-none-any.whl
Collecting oauth2client
Using cached https://files.pythonhosted.org/packages/95/a9/4f25a14d23f0786b64875b91784607c2277eff25d48f915e39ff0cff505a/oauth2client-4.1.3-py2.py3-none-any.whl
Collecting google
Using cached https://files.pythonhosted.org/packages/ac/35/17c9141c4ae21e9a29a43acdfd848e3e468a810517f862cad07977bf8fe9/google-3.0.0-py2.py3-none-any.whl
Collecting configparser
Using cached https://files.pythonhosted.org/packages/2b/af/0e28626b47c84172a112397f034bb1b6349960ca6e0fe7c96666e0ccae69/configparser-5.2.0-py3-none-any.whl
Collecting youtube-dl
Using cached https://files.pythonhosted.org/packages/40/93/65c208f51895f74bbfea1423974c54fff1d1c4e9a97ebee1011b021554b8/youtube_dl-2021.12.17-py2.py3-none-any.whl
Collecting httplib2<1dev,>=0.15.0 (from google-api-python-client)
Using cached https://files.pythonhosted.org/packages/31/c9/4720a06cc961415e49735e672071b1da1621a347e14a9b1f3728a59a2cbd/httplib2-0.21.0-py3-none-any.whl
Collecting google-auth-httplib2>=0.1.0 (from google-api-python-client)
Using cached https://files.pythonhosted.org/packages/ba/db/721e2f3f32339080153995d16e46edc3a7657251f167ddcb9327e632783b/google_auth_httplib2-0.1.0-py2.py3-none-any.whl
Collecting google-auth<3.0.0dev,>=1.19.0 (from google-api-python-client)
Using cached https://files.pythonhosted.org/packages/93/c4/16f8ad44ed7544244a9883f35cc99dc96378652a0ec7cc39028b1c697a1e/google_auth-2.16.2-py2.py3-none-any.whl
Collecting uritemplate<5,>=3.0.1 (from google-api-python-client)
Using cached https://files.pythonhosted.org/packages/81/c0/7461b49cd25aeece13766f02ee576d1db528f1c37ce69aee300e075b485b/uritemplate-4.1.1-py2.py3-none-any.whl
Collecting google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5 (from google-api-python-client)
Using cached https://files.pythonhosted.org/packages/98/15/de395aafcfc2b2e37c49672379e6ee23981ac8500b9667be697a85b1e7f0/google_api_core-2.8.2-py3-none-any.whl
Collecting pyasn1>=0.1.7 (from oauth2client)
Using cached https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl
Requirement already satisfied: six>=1.6.1 in /usr/lib/python3/dist-packages (from oauth2client)
Collecting rsa>=3.1.4 (from oauth2client)
Using cached https://files.pythonhosted.org/packages/49/97/fa78e3d2f65c02c8e1268b9aba606569fe97f6c8f7c2d74394553347c145/rsa-4.9-py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client)
Using cached https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl
Collecting beautifulsoup4 (from google)
Using cached https://files.pythonhosted.org/packages/c6/ee/16d6f808f5668317d7c23f942091fbc694bcded6aa39678e5167f61b2ba0/beautifulsoup4-4.11.2-py3-none-any.whl
Collecting pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2; python_version > "3.0" (from httplib2<1dev,>=0.15.0->google-api-python-client)
Using cached https://files.pythonhosted.org/packages/6c/10/a7d0fa5baea8fe7b50f448ab742f26f52b80bfca85ac2be9d35cdd9a3246/pyparsing-3.0.9-py3-none-any.whl
Collecting cachetools<6.0,>=2.0.0 (from google-auth<3.0.0dev,>=1.19.0->google-api-python-client)
Downloading https://files.pythonhosted.org/packages/ea/c1/4740af52db75e6dbdd57fc7e9478439815bbac549c1c05881be27d19a17d/cachetools-4.2.4-py3-none-any.whl
Collecting requests<3.0.0dev,>=2.18.0 (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client)
Using cached https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl
Collecting protobuf<5.0.0dev,>=3.15.0 (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client)
Using cached https://files.pythonhosted.org/packages/6c/be/4e32d02bf08b8f76bf6e59f2a531690c1e4264530404501f3489ca975d9a/protobuf-4.21.0-py2.py3-none-any.whl
protobuf requires Python '>=3.7' but the running Python is 3.6.9
UPD
Попробовал использовать Python 3.8, тогда бинарник собирается, но не запускается. Непонятно, что должно быть в этом $appimagedir/AppRun-$arch
.