Fix installation with Python 3.6, 3.7
Hi,
I tried to install the bindings with Python 3.6/3.7 but didn't succeed. It required only a few minor changes to get it running which are included in this MR. Hope it's okay that I didn't open a JIRA ticket before.
Setup
- Centos7
- boost 1.68.0 installed from source
- python 3.6/3.7 installed from source
- gfal2 installed via
yum install epel-release; yum install gfal2-all gfal2-devel
My DockerFile is here.
I started to install the bindings with
cd gfal2-bindings
python3.6 setup.py install
Errors
Three errors showed up consecutively. I added inline comments to the changes to explain what I did.
CMake Error: The source directory "/root/dev/gfal2-bindings/build/temp.linux-x86_64-3.6" does not appear to contain CMakeLists.txt
CMake could not detect the proper libboost_python.
CMake found a wrong Python 3 executable (there is also a Python 3.4 in my container), though I explicitly started with python3.6
.
Tests
I successfully tested the installation on 2.7, 3.6 and 3.7. In case you want to reconfirm, you can use my docker image riga/law
(3.7) from the Docker hub.