[med-svn] [jellyfish] 01/07: fix python bindings
Michael Crusoe
misterc-guest at moszumanska.debian.org
Sat Mar 12 22:17:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
misterc-guest pushed a commit to branch master
in repository jellyfish.
commit e526a4ff0712631c327b278e5deaf24a8c71f278
Author: Michael R. Crusoe <crusoe at ucdavis.edu>
Date: Sat Mar 12 04:18:57 2016 -0800
fix python bindings
---
debian/control | 11 ++++++-----
debian/patches/drop-rpath | 19 +++++++++++++++++++
debian/patches/pkg-config-with-name | 13 +++++++++++++
debian/patches/series | 2 ++
debian/rules | 25 ++++++++++++++++++++-----
5 files changed, 60 insertions(+), 10 deletions(-)
diff --git a/debian/control b/debian/control
index 3c3d15f..1e7dc8a 100644
--- a/debian/control
+++ b/debian/control
@@ -16,9 +16,9 @@ Build-Depends: debhelper (>= 9),
swig,
python3-all-dev,
dh-python
-Standards-Version: 3.9.6
+Standards-Version: 3.9.7
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/jellyfish.git
-Vcs-Git: git://anonscm.debian.org/debian-med/jellyfish.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/jellyfish.git
Homepage: http://www.cbcb.umd.edu/software/jellyfish/
Package: jellyfish
@@ -89,10 +89,11 @@ Description: count k-mers in DNA sequences (development files of jellyfish)
header files)
Package: python3-jellyfish
-Architecture: any
+Architecture: any-amd64
Section: python
Depends: ${python3:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ ${shlibs:Depends}
Description: count k-mers in DNA sequences (Python bindings of jellyfish)
JELLYFISH is a tool for fast, memory-efficient counting of k-mers in
DNA. A k-mer is a substring of length k, and counting the occurrences
@@ -111,7 +112,7 @@ Description: count k-mers in DNA sequences (Python bindings of jellyfish)
This package contains the Python bindings of jellyfish.
Package: libjellyfish-perl
-Architecture: all
+Architecture: any-amd64
Section: perl
Depends: ${perl:Depends},
${misc:Depends}
diff --git a/debian/patches/drop-rpath b/debian/patches/drop-rpath
new file mode 100644
index 0000000..d4d802d
--- /dev/null
+++ b/debian/patches/drop-rpath
@@ -0,0 +1,19 @@
+--- jellyfish.orig/swig/python/setup.py
++++ jellyfish/swig/python/setup.py
+@@ -25,7 +25,6 @@
+
+ jf_libs = [re.sub(r'-l', '', x) for x in os.popen("pkg-config --libs-only-l jellyfish-2.0").read().rstrip().split()]
+ jf_libdir = [re.sub(r'-L', '', x) for x in os.popen("pkg-config --libs-only-L jellyfish-2.0").read().rstrip().split()]
+-jf_rpath = [re.sub(r'^', '-Wl,-rpath,', x) for x in jf_libdir]
+ jf_ldflags = os.popen("pkg-config --libs-only-other jellyfish-2.0").read().rstrip().split()
+
+
+@@ -35,7 +34,7 @@
+ libraries = jf_libs,
+ library_dirs = jf_libdir,
+ extra_compile_args = ["-std=c++0x"] + jf_cflags,
+- extra_link_args = jf_ldflags + jf_rpath,
++ extra_link_args = jf_ldflags,
+ language = "c++")
+ setup(name = 'jellyfish',
+ version = '0.0.1',
diff --git a/debian/patches/pkg-config-with-name b/debian/patches/pkg-config-with-name
new file mode 100644
index 0000000..ad62a80
--- /dev/null
+++ b/debian/patches/pkg-config-with-name
@@ -0,0 +1,13 @@
+Description: pkg-config must be called with package name
+Author: Michael R. Crusoe <crusoe at ucdavis.edu>
+--- jellyfish.orig/swig/python/setup.py
++++ jellyfish/swig/python/setup.py
+@@ -21,7 +21,7 @@
+ os.system("swig -c++ -python -o jellyfish_wrap.cxx ../jellyfish.i")
+
+ jf_include = [re.sub(r'-I', '', x) for x in os.popen("pkg-config --cflags-only-I jellyfish-2.0").read().rstrip().split()]
+-jf_cflags = os.popen("pkg-config --cflags-only-other").read().rstrip().split()
++jf_cflags = os.popen("pkg-config --cflags-only-other jellyfish-2.0").read().rstrip().split()
+
+ jf_libs = [re.sub(r'-l', '', x) for x in os.popen("pkg-config --libs-only-l jellyfish-2.0").read().rstrip().split()]
+ jf_libdir = [re.sub(r'-L', '', x) for x in os.popen("pkg-config --libs-only-L jellyfish-2.0").read().rstrip().split()]
diff --git a/debian/patches/series b/debian/patches/series
index 7837bcd..90bdc8d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
+pkg-config-with-name
enable_c++11_error_deprecated-declarations.patch
+drop-rpath
diff --git a/debian/rules b/debian/rules
index 8b88d5a..e512a28 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,14 +6,17 @@ build3vers := $(shell py3versions -sv)
export DH_OPTIONS
%:
- dh $@ --with autoreconf,python3
+ dh $@ --with autoreconf,python3 --parallel
override_dh_install:
# dh_install -X*.a -X*.la -Xpkgconfig
dh_install -ppython3-jellyfish
set -e && for i in $(build3vers); do \
cd swig/python ; \
- python$$i ./setup.py install --install-layout=deb --root ../../debian/python3-jellyfish; \
+ PKG_CONFIG_LIBDIR=${CURDIR} PKG_CONFIG_ALLOW_SYSTEM_LIBS=true \
+ PKG_CONFIG_SYSROOT_DIR=${CURDIR}/debian/tmp/ \
+ python$$i ./setup.py install \
+ --install-layout=deb --root ../../debian/python3-jellyfish; \
cd ../.. ; \
done
@@ -25,9 +28,20 @@ override_dh_install:
--movedev "debian/tmp/usr/include/$(DEBPKGNAME)*/$(DEBPKGNAME)/*.h" usr/include/$(DEBPKGNAME) \
debian/tmp/usr/lib/*/lib$(DEBPKGNAME)-*.so
-#override_dh_auto_configure:
-# # the doc says you need --enable-python-binding but we call setup.py manually
-# dh_auto_configure -- --enable-swig --enable-python-binding --enable-perl-binding
+override_dh_auto_configure:
+# for target in ${SOURCE_DIRECTORIES}; do dh_auto_configure \
+# --sourcedirectory=$${target}
+ dh_auto_configure -- --enable-swig --enable-python-binding --enable-perl-binding
+
+override_dh_auto_clean:
+ set -e && for i in $(build3vers); do \
+ cd swig/python ; \
+ PKG_CONFIG_LIBDIR=${CURDIR} PKG_CONFIG_ALLOW_SYSTEM_LIBS=true \
+ PKG_CONFIG_SYSROOT_DIR=${CURDIR}/debian/tmp/ \
+ python$$i ./setup.py clean --all ; \
+ cd ../.. ; \
+ done
+ dh_auto_clean
override_dh_clean:
dh_clean
@@ -36,6 +50,7 @@ override_dh_clean:
rmdir debian/tmp_save_tests ; \
fi
rm -f tests/compat.sh
+ rm -f swig/python/jellyfish*
override_dh_auto_build:
mkdir -p debian/tmp_save_tests
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/jellyfish.git
More information about the debian-med-commit
mailing list