File: module-install-local

package info (click to toggle)
python3.13 3.13.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,328 kB
  • sloc: python: 704,014; ansic: 653,914; xml: 31,250; sh: 5,844; cpp: 4,326; makefile: 1,981; objc: 787; lisp: 502; javascript: 213; asm: 75; csh: 12
file content (69 lines) | stat: -rwxr-xr-x 2,201 bytes parent folder | download | duplicates (3)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh

cp -a debian/tests/packages "$AUTOPKGTEST_TMP"
dist_packages=/usr/local/lib/python3.13/dist-packages

setUp() {
	mount -t tmpfs tmpfs $dist_packages
}

tearDown() {
	umount $dist_packages
}

testFibPy() {
	cd "$AUTOPKGTEST_TMP/packages/fibpy"
	python3.13 setup.py install
	assertTrue 'Install fibpy in /usr/local' $?
	assertTrue 'fibpy was installed to /usr/local' "[ -e $dist_packages/fibpy-*.egg ]"
	cd "$AUTOPKGTEST_TMP"
	stdout=$(python3.13 -m fibpy 5)
	assertTrue 'Execute fibpy from /usr/local' $?
	assertEquals 'Correct result' 8 "$stdout"
}

testFibC() {
	cd "$AUTOPKGTEST_TMP/packages/fibc"
	python3.13 setup.py install
	assertTrue 'Install fibc in /usr/local' $?
	assertTrue 'fibc was installed to /usr/local' "[ -e $dist_packages/fibc-*.egg ]"
	cd "$AUTOPKGTEST_TMP"
	stdout=$(python3.13 -c 'from fibc import fib; print(fib(5))')
	assertTrue 'Execute fibc from /usr/local' $?
	assertEquals 'Correct result' 8 "$stdout"
}

testFibPyDevelop() {
	cd "$AUTOPKGTEST_TMP/packages/fibpy"
	python3.13 setup.py develop
	assertTrue 'Install editable fibpy in /usr/local' $?
	assertTrue 'fibpy was linked to /usr/local' "[ -e $dist_packages/fibpy.egg-link ]"
	cd "$AUTOPKGTEST_TMP"
	stdout=$(python3.13 -m fibpy 5)
	assertTrue 'Execute editable fibpy from /usr/local' $?
	assertEquals 'Correct result' 8 "$stdout"
}

testFibPyPip() {
	cd "$AUTOPKGTEST_TMP"
	python3.13 -m pip install --break-system-packages --no-build-isolation \
		-v "$AUTOPKGTEST_TMP/packages/fibpy"
	assertTrue 'Install fibpy via pip in /usr/local' $?
	assertTrue 'fibpy was installed to /usr/local' "[ -e $dist_packages/fibpy.py ]"
	stdout=$(python3.13 -m fibpy 5)
	assertTrue 'Execute fibpy from /usr/local' $?
	assertEquals 'Correct result' 8 "$stdout"
}

testFibPyPipEditable() {
	cd "$AUTOPKGTEST_TMP"
	python3.13 -m pip install --no-build-isolation --break-system-packages\
		-v -e "$AUTOPKGTEST_TMP/packages/fibpy"
	assertTrue 'Install editable fibpy via pip in /usr/local' $?
	assertTrue 'fibpy was linked to /usr/local' "[ -e $dist_packages/__editable__.fibpy-42.0.0.pth ]"
	stdout=$(python3.13 -m fibpy 5)
	assertTrue 'Execute fibpy from /usr/local' $?
	assertEquals 'Correct result' 8 "$stdout"
}

. shunit2