[Scipy-svn] r6706 - trunk/scipy/cluster

scipy-svn@scip... scipy-svn@scip...
Sat Sep 11 19:46:37 CDT 2010


Author: ptvirtan
Date: 2010-09-11 19:46:37 -0500 (Sat, 11 Sep 2010)
New Revision: 6706

Modified:
   trunk/scipy/cluster/setup.py
Log:
3K: add scipy PY3K defines for scipy.cluster.

Modified: trunk/scipy/cluster/setup.py
===================================================================
--- trunk/scipy/cluster/setup.py	2010-09-12 00:46:23 UTC (rev 6705)
+++ trunk/scipy/cluster/setup.py	2010-09-12 00:46:37 UTC (rev 6706)
@@ -1,7 +1,13 @@
 #!/usr/bin/env python
+import sys
 
 from os.path import join
 
+if sys.version_info[0] >= 3:
+    DEFINE_MACROS = [("SCIPY_PY3K", None)]
+else:
+    DEFINE_MACROS = []
+
 def configuration(parent_package = '', top_path = None):
     from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
     config = Configuration('cluster', parent_package, top_path)
@@ -10,11 +16,13 @@
 
     config.add_extension('_vq',
         sources=[join('src', 'vq_module.c'), join('src', 'vq.c')],
-        include_dirs = [get_numpy_include_dirs()])
+        include_dirs = [get_numpy_include_dirs()],
+        define_macros=DEFINE_MACROS)
 
     config.add_extension('_hierarchy_wrap',
         sources=[join('src', 'hierarchy_wrap.c'), join('src', 'hierarchy.c')],
-        include_dirs = [get_numpy_include_dirs()])
+        include_dirs = [get_numpy_include_dirs()],
+        define_macros=DEFINE_MACROS)
 
     return config
 



More information about the Scipy-svn mailing list