make python3 optional on RHEL 7
Python 3 is available on Fedora, but when it comes to RHEL 7, it's only available in EPEL. We should make this optional for situations where we can't depend on EPEL's Python 3 for builds (eg. RH Ceph Storage downstream).
I think this can be broken down into a couple parts:
CMake should have a "WITH_PYTHON3" variable so that we can set
-DWITH_PYTHON3=OFF when building on RHEL 7.
All Python 3-specific content in the RPMs should be split out into separate packages that will be made optional.
#2 Updated by Willem Jan Withagen over 6 years ago
Tried things on FreeBSD, and making python3 optional in src/CMakeLists.txt is possible by changing REQUIRED into QUIET...
But then CMake bombs out on checking the cython stuff, and expects to build with Cython3.
And that also happens if python3 is not even installed.
So that will require some more conditionals in generating the for-list for iterating over the different versions.