]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: add WITH_PYTHON2 option
authorKefu Chai <kchai@redhat.com>
Tue, 23 Jan 2018 05:01:31 +0000 (13:01 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 26 Jan 2018 12:06:21 +0000 (20:06 +0800)
commit8b21ba9242eebbfc6f3795af4267bcf52b1a11d2
tree21f8e52e0b7e8fa016010a68bd42954aa11fed3f
parent6f725e76d5d123ea5966cb367eda6269843f4ef9
cmake: add WITH_PYTHON2 option

* add WITH_PYTHON2 option, so we can build python3 bindings only.
* change the default value of WITH_PYTHON3 option to "OFF", as the
option() command in cmake only allow the initial value to be "ON" or
"OFF". we could use a cached string for this option, but i think it
would be more explicit to continue using the option() command.
* fix the installation dir of "ceph_rest_api.py". please note, we still
have a *default* python version, which is specified by the last element
of ${py_vers}. for instance, ${PYTHON_VERSION} will be 3 if ${py_vers}
is 2;3. in this change, 2 is still the default python version, if both
WITH_PYTHON2 and WITH_PYTHON3 are enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt
src/pybind/CMakeLists.txt