[Scipy-svn] r5504 - in branches/0.7.x/scipy: lib/blas lib/lapack linalg

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Jan 19 05:25:02 EST 2009


Author: cdavid
Date: 2009-01-19 04:24:57 -0600 (Mon, 19 Jan 2009)
New Revision: 5504

Modified:
   branches/0.7.x/scipy/lib/blas/atlas_version.c
   branches/0.7.x/scipy/lib/lapack/atlas_version.c
   branches/0.7.x/scipy/linalg/atlas_version.c
Log:
Do not print atlas build info at import; add a version function if printing is necessary.

Modified: branches/0.7.x/scipy/lib/blas/atlas_version.c
===================================================================
--- branches/0.7.x/scipy/lib/blas/atlas_version.c	2009-01-19 08:46:13 UTC (rev 5503)
+++ branches/0.7.x/scipy/lib/blas/atlas_version.c	2009-01-19 10:24:57 UTC (rev 5504)
@@ -1,24 +1,43 @@
 #ifdef __CPLUSPLUS__
 extern "C" {
 #endif
+
 #include "Python.h"
-static PyMethodDef module_methods[] = { {NULL,NULL} };
-PyMODINIT_FUNC initatlas_version(void) {
-  PyObject *m = NULL;
+
+void ATL_buildinfo(void);
+
+static char doc_version[] = "Print ATLAS build info.";
+
+static  PyObject *version(PyObject* self, PyObject* args)
+{
 #if defined(NO_ATLAS_INFO)
-  printf("NO ATLAS INFO AVAILABLE\n");
+        printf("NO ATLAS INFO AVAILABLE\n");
 #else
-  void ATL_buildinfo(void);
-  ATL_buildinfo();
+        ATL_buildinfo();
 #endif
-  m = Py_InitModule("atlas_version", module_methods);
+
+        Py_INCREF(Py_None);
+        return Py_None;
+}
+
+static PyMethodDef module_methods[] = { 
+	{"version", version, METH_VARARGS, doc_version},
+        {NULL, NULL, 0, NULL}
+};
+
+PyMODINIT_FUNC initatlas_version(void) 
+{
+        PyObject *m = NULL;
+        m = Py_InitModule("atlas_version", module_methods);
 #if defined(ATLAS_INFO)
-  {
-    PyObject *d = PyModule_GetDict(m);
-    PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
-  }
+        {
+                PyObject *d = PyModule_GetDict(m);
+                PyDict_SetItemString(d, "ATLAS_VERSION",
+                                     PyString_FromString(ATLAS_INFO));
+        }
 #endif
 }
+
 #ifdef __CPLUSCPLUS__
 }
 #endif

Modified: branches/0.7.x/scipy/lib/lapack/atlas_version.c
===================================================================
--- branches/0.7.x/scipy/lib/lapack/atlas_version.c	2009-01-19 08:46:13 UTC (rev 5503)
+++ branches/0.7.x/scipy/lib/lapack/atlas_version.c	2009-01-19 10:24:57 UTC (rev 5504)
@@ -1,24 +1,43 @@
 #ifdef __CPLUSPLUS__
 extern "C" {
 #endif
+
 #include "Python.h"
-static PyMethodDef module_methods[] = { {NULL,NULL} };
-PyMODINIT_FUNC initatlas_version(void) {
-  PyObject *m = NULL;
+
+void ATL_buildinfo(void);
+
+static char doc_version[] = "Print ATLAS build info.";
+
+static  PyObject *version(PyObject* self, PyObject* args)
+{
 #if defined(NO_ATLAS_INFO)
-  printf("NO ATLAS INFO AVAILABLE\n");
+        printf("NO ATLAS INFO AVAILABLE\n");
 #else
-  void ATL_buildinfo(void);
-  ATL_buildinfo();
+        ATL_buildinfo();
 #endif
-  m = Py_InitModule("atlas_version", module_methods);
+
+        Py_INCREF(Py_None);
+        return Py_None;
+}
+
+static PyMethodDef module_methods[] = { 
+	{"version", version, METH_VARARGS, doc_version},
+        {NULL, NULL, 0, NULL}
+};
+
+PyMODINIT_FUNC initatlas_version(void) 
+{
+        PyObject *m = NULL;
+        m = Py_InitModule("atlas_version", module_methods);
 #if defined(ATLAS_INFO)
-  {
-    PyObject *d = PyModule_GetDict(m);
-    PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
-  }
+        {
+                PyObject *d = PyModule_GetDict(m);
+                PyDict_SetItemString(d, "ATLAS_VERSION",
+                                     PyString_FromString(ATLAS_INFO));
+        }
 #endif
 }
+
 #ifdef __CPLUSCPLUS__
 }
 #endif

Modified: branches/0.7.x/scipy/linalg/atlas_version.c
===================================================================
--- branches/0.7.x/scipy/linalg/atlas_version.c	2009-01-19 08:46:13 UTC (rev 5503)
+++ branches/0.7.x/scipy/linalg/atlas_version.c	2009-01-19 10:24:57 UTC (rev 5504)
@@ -1,24 +1,43 @@
 #ifdef __CPLUSPLUS__
 extern "C" {
 #endif
+
 #include "Python.h"
-static PyMethodDef module_methods[] = { {NULL,NULL} };
-PyMODINIT_FUNC initatlas_version(void) {
-  PyObject *m = NULL;
+
+void ATL_buildinfo(void);
+
+static char doc_version[] = "Print ATLAS build info.";
+
+static  PyObject *version(PyObject* self, PyObject* args)
+{
 #if defined(NO_ATLAS_INFO)
-  printf("NO ATLAS INFO AVAILABLE\n");
+        printf("NO ATLAS INFO AVAILABLE\n");
 #else
-  void ATL_buildinfo(void);
-  ATL_buildinfo();
+        ATL_buildinfo();
 #endif
-  m = Py_InitModule("atlas_version", module_methods);
+
+        Py_INCREF(Py_None);
+        return Py_None;
+}
+
+static PyMethodDef module_methods[] = { 
+	{"version", version, METH_VARARGS, doc_version},
+        {NULL, NULL, 0, NULL}
+};
+
+PyMODINIT_FUNC initatlas_version(void) 
+{
+        PyObject *m = NULL;
+        m = Py_InitModule("atlas_version", module_methods);
 #if defined(ATLAS_INFO)
-  {
-    PyObject *d = PyModule_GetDict(m);
-    PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
-  }
+        {
+                PyObject *d = PyModule_GetDict(m);
+                PyDict_SetItemString(d, "ATLAS_VERSION",
+                                     PyString_FromString(ATLAS_INFO));
+        }
 #endif
 }
+
 #ifdef __CPLUSCPLUS__
 }
 #endif




More information about the Scipy-svn mailing list