pybind / cmake_example

Example pybind11 module built with a CMake-based build system
Other
613 stars 218 forks source link

`version` in `setup.py` is not working, need to set it inside `main.cpp` #128

Closed panfengli-work closed 1 year ago

panfengli-work commented 1 year ago

I find the version set in setup.py is not working, instead I need to specify the version inside main.cpp, is it desired behaviour?

panfengli-work commented 1 year ago

Figured it out: 1) If you build by yourself, directly go to your build directory, and import cmake_example, the version is the one defined in main.cpp. 2) If you simply pip install ., the version is the one defined in setup.py.