PKGBUILDs/core/python/genrebuild
2021-09-10 12:46:33 +00:00

15 lines
800 B
Bash
Executable file

#!/bin/bash
pyver=$(pacman -S --print-format %v python | grep -oP '^[0-9]+\.[0-9]+')
exclude=('python2' 'python2-.*' 'pypy3\?' 'cython2' 'cuda' 'metasploit'
'mysql-workbench' 'ntop' 'dia' 'ghidra' 'kross-interpreters'
'kodi-gbm' 'kodi-wayland' 'kodi-x11')
{
pacman -Fq /usr/lib/python${pyver}/ | grep -v archlinuxcn | cut -d / -f 2
pacman -Fxq "\.cpython-${pyver/.}.pyc$" | grep -v archlinuxcn | cut -d / -f 2
sogrep all libpython${pyver}.so
ssh dragon.archlinux.org "parallel \"zstdgrep -q 'Py_Initialize\|PyInit_\|PyModule_Create2' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.zst"
ssh dragon.archlinux.org "parallel \"xzgrep -q 'Py_Initialize\|PyInit_\|PyModule_Create2' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.xz"
} | grep -xvf <(printf "%s\n" "${exclude[@]}") | sort -u