···1616 # .test() function, which will run the test suite.
1717 checkPhase = ''
1818 runHook preCheck
1919-2020- _python=${python}/bin/${python.executable}
2121-2222- # We will "install" into a temp directory, so that we can run the
2323- # tests (see below).
2424- install_dir="$TMPDIR/test_install"
2525- install_lib="$install_dir/lib/${python.libPrefix}/site-packages"
2626- mkdir -p $install_dir
2727- $_python setup.py install \
2828- --install-lib=$install_lib \
2929- --old-and-unmanageable \
3030- --prefix=$install_dir > /dev/null
3131-3232- # Create a directory in which to run tests (you get an error if you try to
3333- # import the package when you're in the current directory).
3434- mkdir $TMPDIR/run_tests
3535- pushd $TMPDIR/run_tests > /dev/null
3636- # Temporarily add the directory we installed in to the python path
3737- # (not permanently, or this pythonpath will wind up getting exported),
3838- # and run the test suite.
3939- PYTHONPATH="$install_lib:$PYTHONPATH" $_python -c \
4040- 'import ${pkgName}; ${pkgName}.test("fast", verbose=10)'
4141- popd > /dev/null
4242-1919+ pushd dist
2020+ ${python.interpreter} -c 'import ${pkgName}; ${pkgName}.test("fast", verbose=10)'
2121+ popd
4322 runHook postCheck
4423 '';
4524