pybind / cmake_example

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

Keep cmake_example and python_example in sync as much as possible #4

Closed SylvainCorlay closed 8 years ago

SylvainCorlay commented 8 years ago

I think that it would be beneficial to keep the two projects in sync as much as possible (directory structure, conda recipe). I imagine that if someone solves an issue for one, it will apply to the other if it is not cmake of distutils.compiler - specific.

I don't have a strong opinion of these matters (except that we should probably rename python_example/py to python_example/src like in cmake_example).

dean0x7d commented 8 years ago

I agree. On the cmake_example side, the main.cpp file should be updated to match the one from python_example. With the docstrings in place, the sphinx docs folder could also be added.

In the other direction, if you are open to it, I believe that the .travis.yml and .appveyor.yml files from cmake_example could be added to python_example. The installation procedures are identical so the CI configs would not require any changes. Although, those only test pip install, since I haven't gotten around to setting up Travis and AppVeyor for the conda recipe. But I'd like to include a test for that as well.

There is a little bit of divergence with regard to Windows: because CMake will internally pick the latest VS version and set the environment appropriately, there is no need to manually call vcvarsall.bat. I assume this would also be the case for the conda recipe in cmake_example, so those lines probably can be removed. But as I said, I have not yet gotten around to testing this.

SylvainCorlay commented 8 years ago

I agree. On the cmake_example side, the main.cpp file should be updated to match the one from python_example. With the docstrings in place, the sphinx docs folder could also be added.

👍

In the other direction, if you are open to it, I believe that the .travis.yml and .appveyor.yml files from cmake_example could be added to python_example. [...]

Yes, that is a good idea.

There is a little bit of divergence with regard to Windows: because CMake will internally pick the latest VS version and set the environment appropriately, there is no need to manually specify vcvarsall.bat. [...]

Interesting.

dean0x7d commented 8 years ago

The projects should be in sync now with the bulk of the changes in pybind/cmake_example#5 and pybind/python_example#14. I don't expect any huge changes in the future, so the sync should be easy to maintain.