Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / lib / dpkg / info / | server ip : 104.21.89.46 your ip : 172.69.17.38 H O M E |
Filename | /var/lib/dpkg/info/python3.4-minimal.postinst |
Size | 2.41 kb |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 09:50 |
Last modified | 11-Apr-2014 22:15 |
Last accessed | 06-Jul-2025 21:45 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#! /bin/sh
set -e
if [ ! -f /etc/python3.4/sitecustomize.py ]; then
cat <<-EOF
# Empty sitecustomize.py to avoid a dangling symlink
EOF
fi
case "$1" in
configure)
# Create empty directories in /usr/local
if [ ! -e /usr/local/lib/python3.4 ]; then
mkdir -p /usr/local/lib/python3.4 2> /dev/null || true
chmod 2775 /usr/local/lib/python3.4 2> /dev/null || true
chown root:staff /usr/local/lib/python3.4 2> /dev/null || true
fi
localsite=/usr/local/lib/python3.4/dist-packages
if [ ! -e $localsite ]; then
mkdir -p $localsite 2> /dev/null || true
chmod 2775 $localsite 2> /dev/null || true
chown root:staff $localsite 2> /dev/null || true
fi
if which update-binfmts >/dev/null; then
update-binfmts --import python3.4
fi
;;
esac
if [ "$1" = configure ]; then
# only available before removal of the packaging package
rm -f /etc/python3.4/sysconfig.cfg
if ls -L /usr/lib/python3.4/sitecustomize.py >/dev/null 2>&1; then
filt='cat'
else
filt='fgrep -v sitecustomize.py'
fi
files=$(dpkg -L libpython3.4-minimal \
| sed -n '/^\/usr\/lib\/python3.4\/.*\.py$/p' | $filt)
if [ -n "$files" ]; then
python3.4 -E -S /usr/lib/python3.4/py_compile.py $files
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
python3.4 -E -S -O /usr/lib/python3.4/py_compile.py $files
fi
else
echo >&2 "python3.4-minimal: can't get files for byte-compilation"
fi
bc=no
#if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.5-3 \
# || [ -f /var/lib/python/python3.4_installed ]; then
# bc=yes
#fi
if ! grep -sq '^supported-versions[^#]*python3.4' /usr/share/python/debian_defaults
then
# FIXME: byte compile anyway?
bc=no
fi
if [ "$bc" = yes ]; then
# new installation or installation of first version with hook support
if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
echo "Linking and byte-compiling packages for runtime python3.4..."
fi
version=$(dpkg -s python3.4-minimal | awk '/^Version:/ {print $2}')
for hook in /usr/share/python3/runtime.d/*.rtinstall; do
[ -x $hook ] || continue
$hook rtinstall python3.4 "$2" "$version"
done
if [ -f /var/lib/python/python3.4_installed ]; then
rm -f /var/lib/python/python3.4_installed
rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
fi
fi
fi
exit 0
set -e
if [ ! -f /etc/python3.4/sitecustomize.py ]; then
cat <<-EOF
# Empty sitecustomize.py to avoid a dangling symlink
EOF
fi
case "$1" in
configure)
# Create empty directories in /usr/local
if [ ! -e /usr/local/lib/python3.4 ]; then
mkdir -p /usr/local/lib/python3.4 2> /dev/null || true
chmod 2775 /usr/local/lib/python3.4 2> /dev/null || true
chown root:staff /usr/local/lib/python3.4 2> /dev/null || true
fi
localsite=/usr/local/lib/python3.4/dist-packages
if [ ! -e $localsite ]; then
mkdir -p $localsite 2> /dev/null || true
chmod 2775 $localsite 2> /dev/null || true
chown root:staff $localsite 2> /dev/null || true
fi
if which update-binfmts >/dev/null; then
update-binfmts --import python3.4
fi
;;
esac
if [ "$1" = configure ]; then
# only available before removal of the packaging package
rm -f /etc/python3.4/sysconfig.cfg
if ls -L /usr/lib/python3.4/sitecustomize.py >/dev/null 2>&1; then
filt='cat'
else
filt='fgrep -v sitecustomize.py'
fi
files=$(dpkg -L libpython3.4-minimal \
| sed -n '/^\/usr\/lib\/python3.4\/.*\.py$/p' | $filt)
if [ -n "$files" ]; then
python3.4 -E -S /usr/lib/python3.4/py_compile.py $files
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
python3.4 -E -S -O /usr/lib/python3.4/py_compile.py $files
fi
else
echo >&2 "python3.4-minimal: can't get files for byte-compilation"
fi
bc=no
#if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.5-3 \
# || [ -f /var/lib/python/python3.4_installed ]; then
# bc=yes
#fi
if ! grep -sq '^supported-versions[^#]*python3.4' /usr/share/python/debian_defaults
then
# FIXME: byte compile anyway?
bc=no
fi
if [ "$bc" = yes ]; then
# new installation or installation of first version with hook support
if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
echo "Linking and byte-compiling packages for runtime python3.4..."
fi
version=$(dpkg -s python3.4-minimal | awk '/^Version:/ {print $2}')
for hook in /usr/share/python3/runtime.d/*.rtinstall; do
[ -x $hook ] || continue
$hook rtinstall python3.4 "$2" "$version"
done
if [ -f /var/lib/python/python3.4_installed ]; then
rm -f /var/lib/python/python3.4_installed
rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
fi
fi
fi
exit 0