]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
configure/packaging: introduce Cython dependency
authorHector Martin <marcan@marcan.st>
Tue, 1 Dec 2015 14:20:01 +0000 (23:20 +0900)
committerHector Martin <marcan@marcan.st>
Tue, 1 Dec 2015 15:29:54 +0000 (00:29 +0900)
To prepare for the migration of rbd.py to Cython, add Cython as a package
dependency and have the configure script look for it.

Also adds Cython as a dependency for admin/build-doc, and changes the
virtualenv to allow usage of system packages (to avoid having to compile
Cython inside the virtualenv).

With contributions by Josh Durgin <jdurgin@redhat.com>

Signed-off-by: Hector Martin <marcan@marcan.st>
admin/build-doc
ceph.spec.in
configure.ac
debian/control

index 74892321b8fb215fb32e88093670f134e2f9138b..37411667dcf3732a1fda5f03cf4f73ed6b914475 100755 (executable)
@@ -7,7 +7,7 @@ TOPDIR=`pwd`
 install -d -m0755 build-doc
 
 if command -v dpkg >/dev/null; then
-    for package in python-dev python-pip python-virtualenv doxygen ditaa ant libxml2-dev libxslt1-dev; do
+    for package in python-dev python-pip python-virtualenv doxygen ditaa ant libxml2-dev libxslt1-dev cython; do
        if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
             # add a space after old values
            missing="${missing:+$missing }$package"
@@ -19,7 +19,7 @@ if command -v dpkg >/dev/null; then
        exit 1
     fi
 elif command -v yum >/dev/null; then
-    for package in python-devel python-pip python-virtualenv doxygen ditaa ant libxml-devel libxslt-devel; do
+    for package in python-devel python-pip python-virtualenv doxygen ditaa ant libxml-devel libxslt-devel Cython; do
        if ! rpm -q $package >/dev/null ; then
                missing="${missing:+$missing }$package"
        fi
@@ -30,7 +30,7 @@ elif command -v yum >/dev/null; then
         exit 1
     fi
 else
-    for command in virtualenv doxygen ant ditaa; do
+    for command in virtualenv doxygen ant ditaa cython; do
        command -v "$command" > /dev/null;
        ret_code=$?
        if [ $ret_code -ne 0 ]; then
@@ -56,7 +56,7 @@ cd build-doc
 [ -z "$vdir" ] && vdir="./virtualenv"
 
 if [ ! -e $vdir ]; then
-    virtualenv --no-site-packages $vdir
+    virtualenv --system-site-packages $vdir
 fi
 $vdir/bin/pip install --quiet -r ../admin/doc-requirements.txt
 
index b5b8412a74a171e1c973762f3a9f4df2c26b4201..ea5dc0dcf134f94855ef4e842e50fa06a659c9f3 100644 (file)
@@ -106,6 +106,7 @@ BuildRequires:      boost-devel
 BuildRequires:  cmake
 BuildRequires: cryptsetup
 BuildRequires: fuse-devel
+BuildRequires: Cython
 BuildRequires: gdbm
 BuildRequires: hdparm
 BuildRequires: leveldb-devel > 1.2
index 77fe957d83d80a7d5368093dff2521206ce8ac23..d5acbc5c798cdf8b8ddaff678a4148daed7cb981 100644 (file)
@@ -125,6 +125,12 @@ AC_ARG_WITH([rbd],
 AM_CONDITIONAL(WITH_RBD, test "$with_rbd" = "yes")
 #AS_IF([test "$with_rbd" = "yes"], [AC_DEFINE([WITH_RADOS, WITH_RBD])])
 
+AC_ARG_WITH([cython],
+       [AS_HELP_STRING([--with-cython], [build python bindings for librbd])],
+       [],
+       [with_cython=yes])
+AM_CONDITIONAL(WITH_CYTHON, test "$with_cython" = "yes")
+
 # cephfs?
 # cephfs requires rados
 AC_ARG_WITH([cephfs],
@@ -201,6 +207,14 @@ AC_ARG_ENABLE([server],
 AM_CONDITIONAL(ENABLE_SERVER, test "$enable_server" = "yes")
 #AS_IF([test "$enable_server" = "yes"], [AC_DEFINE([WITH_MON, WITH_OSD, WITH_MDS, ENABLE_SERVER])])
 
+# cython is required to build librbd python bindings
+if test x"$with_cython" = xyes; then
+    AC_CHECK_PROG(CYTHON_CHECK, cython, yes)
+    if test x"$CYTHON_CHECK" != xyes; then
+        AC_MSG_FAILURE([cython not found])
+    fi
+fi
+
 # cond-check if snappy-devel is installed, needed by leveldb that is need by server parts of the project
 AS_IF([test "$enable_server" = "yes" -a \( "$with_osd" = "yes" -o "$with_mon" = "yes" \)],
        [AC_CHECK_LIB([snappy], [snappy_compress], [true], [AC_MSG_FAILURE([libsnappy not found])])])
index d757e05b7daa87e246aaf5276e85079794c6721c..4581619a49e825cb66585d27cc4b885ab6a9574c 100644 (file)
@@ -13,6 +13,7 @@ Build-Depends: autoconf,
               libbz2-dev,
               cmake,
               cryptsetup-bin | cryptsetup,
+               cython,
                debhelper (>= 6.0.7~),
                default-jdk,
                git,