[med-svn] [Git][med-team/libslow5lib][master] 2 commits: Try hard building Python module
Andreas Tille (@tille)
gitlab at salsa.debian.org
Thu Jun 30 14:11:35 BST 2022
Andreas Tille pushed to branch master at Debian Med / libslow5lib
Commits:
4a77d225 by Andreas Tille at 2022-06-30T14:24:38+02:00
Try hard building Python module
- - - - -
1ffad6d1 by Andreas Tille at 2022-06-30T15:11:08+02:00
Fix Python build regarding streamvbyte usage
- - - - -
3 changed files:
- debian/control
- debian/patches/use_debian_packaged_streamvbyte.patch
- debian/rules
Changes:
=====================================
debian/control
=====================================
@@ -7,10 +7,14 @@ Build-Depends: debhelper-compat (= 13),
cmake,
d-shlibs,
dh-python,
- python3,
+ python3-dev,
libstreamvbyte-dev,
libzstd-dev,
zlib1g-dev,
+ cython3,
+ python3-setuptools,
+ python3-numpy,
+ python3-wheel
Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/med-team/libslow5lib
Vcs-Git: https://salsa.debian.org/med-team/libslow5lib.git
@@ -68,3 +72,31 @@ Description: header and static library for reading & writing SLOW5 files
.
This is the development package containing headers and static library.
+Package: python3-slow5
+Architecture: any
+Section: python
+Depends: libslow5-0 (= ${binary:Version}),
+ ${shlibs:Depends},
+ ${python3:Depends},
+ ${misc:Depends}
+Description: Python3 modul for reading & writing SLOW5 files
+ Slow5lib is a software library for reading & writing SLOW5 files.
+ Slow5lib is designed to facilitate use of data in SLOW5 format by third-
+ party software packages. Existing packages that read/write data in FAST5
+ format can be easily modified to support SLOW5.
+ .
+ SLOW5 is a new file format for storing signal data from Oxford Nanopore
+ Technologies (ONT) devices. SLOW5 was developed to overcome inherent
+ limitations in the standard FAST5 signal data format that prevent
+ efficient, scalable analysis and cause many headaches for developers.
+ SLOW5 can be encoded in human-readable ASCII format, or a more compact
+ and efficient binary format (BLOW5) - this is analogous to the seminal
+ SAM/BAM format for storing DNA sequence alignments. The BLOW5 binary
+ format supports *zlib* (DEFLATE) compression, or other compression
+ methods, thereby minimising the data storage footprint while still
+ permitting efficient parallel access. Detailed benchmarking experiments
+ have shown that SLOW5 format is an order of magnitude faster and
+ significantly smaller than FAST5.
+ .
+ This is the Python3 module.
+
=====================================
debian/patches/use_debian_packaged_streamvbyte.patch
=====================================
@@ -87,3 +87,42 @@ Description: Use Debian packaged streamvbyte library
// int16_t *orig = (int16_t *) malloc(length * sizeof *orig);
// for (int64_t i = 0; i < length; ++ i) {
+--- a/setup.py
++++ b/setup.py
+@@ -18,9 +18,9 @@ include_dirs = []
+ # for the install.
+ try:
+ import numpy as np
+- include_dirs = ['include/', np.get_include(), 'thirdparty/streamvbyte/include']
++ include_dirs = ['include/', np.get_include() ]
+ except ImportError:
+- include_dirs = ['include/', 'thirdparty/streamvbyte/include']
++ include_dirs = ['include/']
+ def np(*args, ** kwargs ):
+ import numpy as np
+ return np(*args, ** kwargs)
+@@ -38,13 +38,13 @@ except ImportError:
+
+ sources=['python/pyslow5.pyx', 'src/slow5.c', 'src/slow5_press.c', 'src/slow5_misc.c', 'src/slow5_idx.c',
+ 'python/slow5_write.c', 'python/slow5threads.c',
+- 'thirdparty/streamvbyte/src/streamvbyte_zigzag.c', 'thirdparty/streamvbyte/src/streamvbyte_decode.c', 'thirdparty/streamvbyte/src/streamvbyte_encode.c']
++ ]
+ depends=['python/pyslow5.pxd', 'python/pyslow5.h',
+ 'python/slow5_write.h', 'python/slow5threads.h',
+ 'slow5/slow5.h', 'slow5/slow5_defs.h', 'slow5/slow5_error.h', 'slow5/slow5_press.h',
+ 'slow5/klib/khash.h', 'slow5/klib/kvec.h',
+ 'src/slow5_extra.h', 'src/slow5_idx.h', 'src/slow5_misc.h', 'src/klib/ksort.h',
+- 'thirdparty/streamvbyte/include/streamvbyte.h', 'thirdparty/streamvbyte/include/streamvbyte_zigzag.h']
++ ]
+ extra_compile_args = ['-g', '-Wall', '-O2', '-std=c99']
+ # extra_compile_args = []
+ # os.environ["CFLAGS"] = '-g -Wall -O2 -std=c99'
+@@ -58,7 +58,7 @@ elif arch in ["x86_64"]:
+ extra_compile_args.extend(['-DSTREAMVBYTE_SSSE3=1', '-mssse3']) # WARNING: ancient x86_64 CPUs don't have SSSE3
+
+
+-# include_dirs = ['include/', np.get_include(), 'thirdparty/streamvbyte/include']
++# include_dirs = ['include/', np.get_include() ]
+ libraries = ['m', 'z']
+ library_dirs = ['.']
+
=====================================
debian/rules
=====================================
@@ -3,7 +3,7 @@
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
-include /usr/share/dpkg/default.mk
+export PYBUILD_NAME=slow5
# for hardening you might like to uncomment this:
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
@@ -13,18 +13,19 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
override_dh_auto_configure:
dh_auto_configure -- \
- -DSLOW5_USE_ZSTD="ON" \
+ -DSLOW5_USE_ZSTD="ON"
+ dh_auto_configure --buildsystem=pybuild
override_dh_auto_build:
dh_auto_build
-#FIXME python3 setup.py build
+ python3 setup.py build
#FIXME cp build/lib.*/*.so ./
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
cp -a obj-$(DEB_HOST_GNU_TYPE)/libslow5_static.a lib/libslow5.a
$(MAKE) -C test zstd=1
-#FIXME python3 < python/example.py
+ PYTHONPATH=build/lib* python3 < python/example.py
endif
override_dh_install:
View it on GitLab: https://salsa.debian.org/med-team/libslow5lib/-/compare/6106fa7076c7af2b5e0b22999dbacb973c20e54c...1ffad6d13550544d8d16621bca413aaab8354e26
--
View it on GitLab: https://salsa.debian.org/med-team/libslow5lib/-/compare/6106fa7076c7af2b5e0b22999dbacb973c20e54c...1ffad6d13550544d8d16621bca413aaab8354e26
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220630/7cc6be76/attachment-0001.htm>
More information about the debian-med-commit
mailing list