From: Dominique O. <dom...@gm...> - 2007-05-04 18:46:00
|
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"); 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 |
From: Daniel W. <dan...@ni...> - 2007-05-04 20:06:45
|
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? 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. 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 |
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----- |
From: Daniel W. <dan...@ni...> - 2007-05-21 14:34:12
|
I just fixed the problem below and made a new release. Please take a look and check that it works. If I don't hear any complaints, I'll put together the window binaries and Jon will do the dmg in the next few weeks. On May 4, 2007, at 8:33 PM, Dominique Orban wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Daniel Wheeler wrote: >> On May 4, 2007, at 6:46 PM, Dominique Orban wrote: >> >>> >>> 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 It was broken for me too, but now it seems to be working. Weird. Jon, Is this something that you repaired? > > caused the error message "no module named spmatrix". I presume the > error was coming from itsolvers > and/or precon. -- Daniel Wheeler |
From: Jonathan G. <gu...@ni...> - 2007-05-21 16:05:09
|
On May 21, 2007, at 10:32 AM, Daniel Wheeler wrote: > On May 4, 2007, at 8:33 PM, Dominique Orban wrote: > >> 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 > > It was broken for me too, but now it seems to be working. Weird. > Jon, Is this something that you repaired? I doubt it. I don't have checkin privileges for pysparse. |