123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #! /bin/sh
- required=python
- . test-init.sh
- mkdir sandbox
- cd sandbox
- cp "$am_scriptdir/py-compile" . \
- || fatal_ "failed to fetch auxiliary script py-compile"
- f=__init__
- for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
- if test -z "$d"; then
- d2=.
- else
- d2=$d
- fi
- ../install-sh -d "$d2" "$d2/sub" || exit 99
- : > "$d2/$f.py"
- : > "$d2/sub/$f.py"
- ./py-compile --basedir "$d" "$f.py" "sub/$f.py"
- find "$d2"
- py_installed "$d2/$f.pyc"
- py_installed "$d2/$f.pyo"
- py_installed "$d2/sub/$f.pyc"
- py_installed "$d2/sub/$f.pyo"
- files=$(find "$d2" | grep '\.py[co]$')
- test $(echo "$files" | wc -l) -eq 4
- case $d2 in
- .|..) rm -f $files;;
- *) rm -rf "$d2";;
- esac
- done
- :
|