How to define the output location for pybind11 c++ module using setuptools

Viewed 51

I am building a pybind11 C++ module using following setup.py:

from setuptools import setup, Extension
import pybind11

sfc_module = Extension(
    'run_app',
    sources=['Direct.cpp', 
             'Lib.cpp'],
    include_dirs=[pybind11.get_include(), '.'],
    language='c++',
    extra_compile_args=cpp_args,
    )

setup(
    name='run_app',
    version='1.0',
    description='Python package with RunApp C++ extension (PyBind11)',
    ext_modules=[sfc_module],

Then using python to build it:

python setup.py build

The output library/module is automatically generated at ./build/lib.win-xxxx How can I customize this output location?

0 Answers
Related