I have a C ++ library (we will call it an example in the following) for which I wrote Python bindings using the boost.python library. This library wrapped by Python will be called pyExample. The entire project is built using CMake, and the resulting Python library is a file with a name libpyExample.so.
When I use Python bindings from a Python script located in the same directory as libpyExample.soI just need to write:
import libpyExample
libpyExample.hello_world()
and it performs the function hello_world()opened by the packaging process.
What i want to do
For convenience, I would like my pyExample library to be accessible from anywhere just by using the command
import pyExample
, pyExample virtualenv . , setuptools, . :
libpyExample.so Python script- ,
++ setuptools, ++. , , ?
pyExample setuptools, . CMake , libpyExample.so.