[Numpy-discussion] How to run unittests at build time?

Robert Kern robert.kern@gmail....
Wed Sep 21 16:20:50 CDT 2011


On Wed, Sep 21, 2011 at 16:15, Filipe Pires Alvarenga Fernandes
<ocefpaf@gmail.com> wrote:
> Don't know about about Debian, but this works OK for RPM distros:
>
> PYTHONPATH="%{buildroot}%{py_sitedir}" %{__python} -c \
>                                    "import pkg_resources, numpy ; numpy.test()"
>
> The only thing you are missing is the "import pkg_resources", let me
> know if that works for you.

What does py_sitedir expand to, usually? I don't think pkg_resources
has anything to do with it. numpy doesn't use it, and I don't think
nosetests does either (well, only for its plugin mechanism, but that's
neither here nor there). In any case, I've tried importing
pkg_resources while running from the build/lib.*/ directory and still
get the same errors as reported by Sandro.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the NumPy-Discussion mailing list