diff mbox series

[rdma-core,1/5] cbuild: Make pyverbs build with epel

Message ID 20190514233028.3905-2-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show
Series Build system updates | expand

Commit Message

Jason Gunthorpe May 14, 2019, 11:30 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

For some reason cmake3 installs python3.6, but EPEL only has cython
built for python3.4. Convice the python3 link to be python3.4 so cmake
finds it without hassles.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/cbuild | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Leon Romanovsky May 15, 2019, 5:29 a.m. UTC | #1
On Tue, May 14, 2019 at 08:30:24PM -0300, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg@mellanox.com>
>
> For some reason cmake3 installs python3.6, but EPEL only has cython
> built for python3.4. Convice the python3 link to be python3.4 so cmake
> finds it without hassles.

It depends on our definition of cbuild.
If we say that cbuild purpose is to build packages for given platform,
such hack will be appropriate.
If we say that cbuild purpose is to test and ensure that packages are
built for given platform, such hack will hide the problem that rdma-core
won't be possible to package there.

Thanks
Jason Gunthorpe May 15, 2019, 11:15 a.m. UTC | #2
On Wed, May 15, 2019 at 08:29:47AM +0300, Leon Romanovsky wrote:
> On Tue, May 14, 2019 at 08:30:24PM -0300, Jason Gunthorpe wrote:
> > From: Jason Gunthorpe <jgg@mellanox.com>
> >
> > For some reason cmake3 installs python3.6, but EPEL only has cython
> > built for python3.4. Convice the python3 link to be python3.4 so cmake
> > finds it without hassles.
> 
> It depends on our definition of cbuild.
> If we say that cbuild purpose is to build packages for given platform,
> such hack will be appropriate.
> If we say that cbuild purpose is to test and ensure that packages are
> built for given platform, such hack will hide the problem that rdma-core
> won't be possible to package there.

The EPEL target is for developer use - developers that need to use
cython should pass in the PYTHON_EXECUTABLE environment variable to
get the right version on EPEL.

Jason
diff mbox series

Patch

diff --git a/buildlib/cbuild b/buildlib/cbuild
index 0010f16acfc0e7..30a06f06345743 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -125,8 +125,16 @@  class centos7(YumEnvironment):
     python_cmd = "python";
 
 class centos7_epel(centos7):
-    pkgs = (centos7.pkgs - {"cmake","make"}) | {"ninja-build","cmake3","pandoc", 'python3-Cython', 'python3-devel'};
+    pkgs = (centos7.pkgs - {"cmake","make"}) | {
+        "cmake3",
+        "ninja-build",
+        "pandoc",
+        "python34-setuptools",
+        'python34-Cython',
+        'python34-devel',
+    };
     name = "centos7_epel";
+    build_pyverbs = True;
     use_make = False;
     pandoc = True;
     ninja_cmd = "ninja-build";
@@ -136,7 +144,7 @@  class centos7_epel(centos7):
     def get_docker_file(self):
         res = YumEnvironment.get_docker_file(self);
         res.lines.insert(1,"RUN yum install -y epel-release");
-        res.lines.append("RUN ln -s /usr/bin/cmake3 /usr/local/bin/cmake");
+        res.lines.append("RUN ln -s /usr/bin/cmake3 /usr/local/bin/cmake && ln -sf /usr/bin/python3.4 /usr/bin/python3");
         return res;
 
 class fc30(Environment):