File: pip3-user.sh

package info (click to toggle)
python-pip 25.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,496 kB
  • sloc: python: 89,559; sh: 75; makefile: 25
file content (29 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

set -eux

export HOME=$AUTOPKGTEST_TMP
export PATH=$PATH:$HOME/.local/bin

if [ $(id -u) = 0 ]
then
    adduser --quiet --system --group --no-create-home testing
    user=testing
    mkdir $HOME/.cache
    chown -R $user $HOME
    runuser="runuser -p -u $user --"
else
    runuser=""
fi

$runuser python3 -m pip install --break-system-packages world
$runuser python3 -m pip list --format=columns
$runuser python3 -m pip show world
ls -ld $HOME/.local/lib/python3.*/site-packages/world-*.dist-info
$runuser python3 -m pip uninstall --break-system-packages -y world
$runuser python3 -m pip list --format=columns
$runuser python3 -m pip list --outdated
if [ $(id -u) = 0 ]
then
    deluser --quiet testing
fi