Permalink
Browse files

detect python version and pick boost_python

  • Loading branch information...
aaalgo committed Mar 16, 2018
1 parent 2372db6 commit 31b1481113d6849f892bb895d7121d1b063def19
Showing with 8 additions and 1 deletion.
  1. +8 −1 setup.py
View
@@ -1,3 +1,4 @@
import sys
import os
import subprocess
import numpy
@@ -8,12 +9,18 @@
numpy_root = os.path.join(os.path.abspath(os.path.dirname(numpy.__file__)), 'core')
if sys.version_info[0] < 3:
boost_python = 'boost_python'
else:
boost_python = 'boost_python3'
pass
pykgraph = Extension('pykgraph',
language = 'c++',
extra_compile_args = ['-O3', '-std=c++11', '-msse2', '-fopenmp', '-DKGRAPH_VERSION=%s' % GIT_VERSION],
extra_link_args = ['-fopenmp'],
include_dirs = ['.', os.path.join(numpy_root, 'include')],
libraries = ['boost_python', 'boost_timer'],
libraries = [boost_python, 'boost_timer'],
sources = ['kgraph.cpp', 'metric.cpp', 'python/pykgraph.cpp'],
depends = ['kgraph.h', 'kgraph-data.h'])

0 comments on commit 31b1481

Please sign in to comment.