From: Noa Osherovich <noaos@xxxxxxxxxxxx> Update packaging files and cbuild dependencies to allow pyverbs to be included in Debian-based distributions. Signed-off-by: Noa Osherovich <noaos@xxxxxxxxxxxx> Signed-off-by: Alaa Hleihel <alaa@xxxxxxxxxxxx> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> --- buildlib/cbuild | 7 ++++--- debian/control | 11 ++++++++++- debian/python3-pyverbs.install | 1 + debian/rules | 2 ++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 debian/python3-pyverbs.install diff --git a/buildlib/cbuild b/buildlib/cbuild index 33c03781..1c01e8be 100755 --- a/buildlib/cbuild +++ b/buildlib/cbuild @@ -74,7 +74,7 @@ class DockerFile(object): class Environment(object): pandoc = True; - python_cmd = "python"; + python_cmd = "python3"; aliases = set(); use_make = False; proxy = True; @@ -172,7 +172,8 @@ class trusty(APTEnvironment): 'ninja-build', 'pandoc', 'pkg-config', - 'python', + 'python3-dev', + 'cython3', 'valgrind', }; pkgs = common_pkgs | { @@ -619,7 +620,7 @@ subprocess.check_call(["debian/rules","debian/rules","binary"]); if args.run_shell: opts.append("/bin/bash"); else: - opts.extend(["python",os.path.join(home,"go.py")]); + opts.extend(["python3",os.path.join(home,"go.py")]); docker_cmd(args,*opts); diff --git a/debian/control b/debian/control index 63a867a8..95ceb530 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,8 @@ Build-Depends: cmake (>= 2.8.11), ninja-build, pandoc, pkg-config, - python, + python3-dev, + cython3, valgrind [amd64 arm64 armhf i386 mips mips64el mipsel powerpc ppc64 ppc64el s390x] Standards-Version: 4.1.4 Vcs-Git: https://github.com/linux-rdma/rdma-core.git @@ -324,3 +325,11 @@ Description: Tools for Infiniband attached storage (SRP) In conjunction with the kernel ib_srp driver, srptools allows you to discover and use Infiniband attached storage devices which use the SCSI RDMA Protocol (SRP). + +Package: python3-pyverbs +Architecture: linux-any +Depends: rdma-core (>= 21), + python3 +Description: Pyverbs is a Python API over IB verbs. It allows an easy + RDMA access for new users as well as fast development of test over + Python. diff --git a/debian/python3-pyverbs.install b/debian/python3-pyverbs.install new file mode 100644 index 00000000..20130d8a --- /dev/null +++ b/debian/python3-pyverbs.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/pyverbs diff --git a/debian/rules b/debian/rules index f62e05a0..600090c9 100755 --- a/debian/rules +++ b/debian/rules @@ -34,6 +34,8 @@ override_dh_auto_configure: -DCMAKE_INSTALL_RUNDIR:PATH=/run \ -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=/lib/udev/rules.d \ -DENABLE_STATIC=1 \ + -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3 \ + -DCMAKE_INSTALL_PYTHON_ARCH_LIB:PATH=/usr/lib/python3/dist-packages \ $(EXTRA_CMAKE_FLAGS) override_dh_auto_build: -- 2.19.1