From a0d647b35e2cd7702eaffbd2074cb2914c6383cd Mon Sep 17 00:00:00 2001 From: Bryn Keller Date: Mon, 2 May 2016 13:23:42 -0700 Subject: Tested with system Python 2.7 on Ubuntu as well as Anaconda Python 3.5 on Ubuntu --- python/setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'python/setup.py') diff --git a/python/setup.py b/python/setup.py index 2c6d65d..133a204 100644 --- a/python/setup.py +++ b/python/setup.py @@ -2,12 +2,14 @@ from setuptools import setup, Extension, find_packages from setuptools.command.build_ext import build_ext import sys import os.path +from io import open ext_modules = [ Extension( '_phat', ['_phat.cpp'], - include_dirs=['include', '../include'], + include_dirs=['include', + '../include'], language='c++', ), ] @@ -15,7 +17,7 @@ ext_modules = [ here = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file -with open(os.path.join(here, 'README.rst')) as f: +with open(os.path.join(here, 'README.rst'), encoding = 'utf8') as f: long_description = f.read() class BuildExt(build_ext): @@ -31,8 +33,10 @@ class BuildExt(build_ext): def build_extensions(self): ct = self.compiler.compiler_type opts = self.c_opts.get(ct, []) + import pybind11 for ext in self.extensions: ext.extra_compile_args = opts + ext.include_dirs.append(pybind11.get_include()) build_ext.build_extensions(self) setup( -- cgit v1.2.3