Commit 800b9ccf authored by Matthieu Dorier's avatar Matthieu Dorier

corrected the way pybake looks for pybind11

parent 47bc978f
from distutils.core import setup
from distutils.extension import Extension
from distutils.sysconfig import get_config_vars
import pybind11
import pkgconfig
import os
import os.path
import sys
def get_pybind11_include():
path = os.path.dirname(pybind11.__file__)
return '/'.join(path.split('/')[0:-4] + ['include'])
(opt,) = get_config_vars('OPT')
os.environ['OPT'] = " ".join(
flag for flag in opt.split() if flag != '-Wstrict-prototypes'
......@@ -24,18 +29,21 @@ client_libraries = pk['libraries']
client_library_dirs = pk['library_dirs']
client_include_dirs = pk['include_dirs']
client_include_dirs.append(".")
client_include_dirs.append(get_pybind11_include())
# For server...
pk = pkgconfig.parse('bake-server')
server_libraries = pk['libraries']
server_library_dirs = pk['library_dirs']
server_include_dirs = pk['include_dirs']
server_include_dirs.append(".")
server_include_dirs.append(get_pybind11_include())
# For target...
pk = pkgconfig.parse('uuid')
target_libraries = pk['libraries']
target_library_dirs = pk['library_dirs']
target_include_dirs = pk['include_dirs']
target_include_dirs.append('.')
target_include_dirs.append(get_pybind11_include())
pk = pkgconfig.parse('bake-server')
target_include_dirs.extend(pk['include_dirs'])
......@@ -62,7 +70,7 @@ pybake_target_module = Extension('_pybaketarget', ["pybake/src/target.cpp"],
depends=["pybake/src/target.cpp"])
setup(name='pybake',
version='0.1',
version='0.2.1',
author='Matthieu Dorier',
description="""Python binding for BAKE""",
ext_modules=[ pybake_server_module, pybake_client_module, pybake_target_module ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment