From: Dominique O. <dom...@gm...> - 2007-05-04 21:02:18
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Daniel Wheeler wrote: > On May 4, 2007, at 6:46 PM, Dominique Orban wrote: > >> Hello, >> >> Since the new pysparse namespace was introduced, I believe there is a >> minor bug in the SpMatrix_API that affects external packages that >> build against PySparse. >> >> The bug is in spmatrix_api.h, in the "import_spmatrix" macro. I >> believe the first line should read >> >> PyObject *spmatrix = PyImport_ImportModule("pysparse.spmatrix"); >> >> instead of >> >> PyObject *spmatrix = PyImport_ImportModule("spmatrix"); > > Thanks for the bug report. Are there any other places with similar > problems? Not that I have noticed. Since I sent the bug report, I observed that the above also affected PySparse itself. For instance, the statement from pysparse import spmatrix, itsolvers, precon caused the error message "no module named spmatrix". I presume the error was coming from itsolvers and/or precon. However, as long as you wrote things as from pysparse import spmatrix from pysparse import itsolvers from pysparse import precon you wouldn't notice because the imports succeed. I am not sure why. > I'll try and make the change on HEAD ASAP. Probably do it next week. > I also need to a new release as the numpy header stuff has now been > sorted out. Thanks. Dominique > > Cheers > >> >> since spmatrix.so is now located under pysparse/. Not doing the above >> change has the following disadvantage. In order to build against >> PySparse and to successfully import spmatrix, one would have to add >> the directory 'pysparse' to their PYTHONPATH. But then, that defeats >> the purpose of the new namespace. >> >> Cheers, >> Dominique > > -- > Daniel Wheeler > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGO5iI2vhdTNgbn8wRAgexAJ9rkTpMija5QRqbbzq/QBFatV4r9QCggnIe laHV6WzqPnG9jmTNnIHk0gw= =AVD4 -----END PGP SIGNATURE----- |