···16 # .test() function, which will run the test suite.
17 checkPhase = ''
18 runHook preCheck
19-20- _python=${python}/bin/${python.executable}
21-22- # We will "install" into a temp directory, so that we can run the
23- # tests (see below).
24- install_dir="$TMPDIR/test_install"
25- install_lib="$install_dir/lib/${python.libPrefix}/site-packages"
26- mkdir -p $install_dir
27- $_python setup.py install \
28- --install-lib=$install_lib \
29- --old-and-unmanageable \
30- --prefix=$install_dir > /dev/null
31-32- # Create a directory in which to run tests (you get an error if you try to
33- # import the package when you're in the current directory).
34- mkdir $TMPDIR/run_tests
35- pushd $TMPDIR/run_tests > /dev/null
36- # Temporarily add the directory we installed in to the python path
37- # (not permanently, or this pythonpath will wind up getting exported),
38- # and run the test suite.
39- PYTHONPATH="$install_lib:$PYTHONPATH" $_python -c \
40- 'import ${pkgName}; ${pkgName}.test("fast", verbose=10)'
41- popd > /dev/null
42-43 runHook postCheck
44 '';
45
···16 # .test() function, which will run the test suite.
17 checkPhase = ''
18 runHook preCheck
19+ pushd dist
20+ ${python.interpreter} -c 'import ${pkgName}; ${pkgName}.test("fast", verbose=10)'
21+ popd
00000000000000000000022 runHook postCheck
23 '';
24