Permalink
Browse files

3K: add scipy PY3K defines for scipy.cluster.

  • Loading branch information...
1 parent 9a2aec1 commit af5044ff25cbc39c21d2e114717755896b8eb75c @pv pv committed Sep 12, 2010
Showing with 10 additions and 2 deletions.
  1. +10 −2 scipy/cluster/setup.py
@@ -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 @@ def configuration(parent_package = '', top_path = None):
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

0 comments on commit af5044f

Please sign in to comment.