[libgetdata] 01/09: Add Python3 bindings
Alastair McKinstry
mckinstry at moszumanska.debian.org
Wed May 3 10:35:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository libgetdata.
commit ecd694bc476ec1551e7e44bc4ccd08aff4c213a0
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Mon Aug 8 20:57:17 2016 +0100
Add Python3 bindings
---
debian/changelog | 6 +++++
debian/control | 15 ++++++++++-
debian/patches/python3.patch | 54 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/python-pygetdata.install | 2 +-
debian/python3-pygetdata.install | 1 +
debian/rules | 14 ++++++-----
7 files changed, 85 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8749b3c..6d7f804 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libgetdata (0.9.3-2) UNRELEASED; urgency=medium
+
+ * experimental python3 bindings
+
+ -- Alastair McKinstry <mckinstry at debian.org> Mon, 08 Aug 2016 20:56:43 +0100
+
libgetdata (0.9.3-1) unstable; urgency=medium
* New upstream version
diff --git a/debian/control b/debian/control
index 3554969..190544f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,10 @@ Source: libgetdata
Priority: extra
Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
Uploaders: Michael Milligan <mmilligan at astro.umn.edu>, Steven Benton <stevebenton at rogers.com>, Alastair McKinstry <mckinstry at debian.org>
-Build-Depends: debhelper (>= 9~), autotools-dev, dh-python, python-numpy, python-all-dev, fortran-compiler, zlib1g-dev, libbz2-dev, liblzma-dev, libzzip-dev , libmodule-build-perl
+Build-Depends: debhelper (>= 9~), autotools-dev,
+ dh-python, python-numpy, python-all-dev,
+ python3-numpy, python3-all-dev,
+ fortran-compiler, zlib1g-dev, libbz2-dev, liblzma-dev, libzzip-dev , libmodule-build-perl
Standards-Version: 3.9.8
X-Python-Version: >= 2.3
Section: science
@@ -104,6 +107,16 @@ Description: library to read/write dirfile data - python bindings
data. The Dirfile database format is designed to provide a fast, simple format
for storing and reading data.
+Package: python3-pygetdata
+Section: python
+Architecture: any
+Depends: libgetdata7 (= ${binary:Version}), python3-numpy, ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Description: library to read/write dirfile data - Python3 bindings
+ The GetData Project is the reference implementation of the Dirfile Standards,
+ a filesystem-based, column-oriented database format for time-ordered binary
+ data. The Dirfile database format is designed to provide a fast, simple format
+ for storing and reading data.
+
Package: libgetdata-perl
Section: perl
Architecture: any
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
new file mode 100644
index 0000000..85aa3d9
--- /dev/null
+++ b/debian/patches/python3.patch
@@ -0,0 +1,54 @@
+Description: Fixes needed for python3 build
+Author: Alastair McKinstry <mckinstry at debian.org>
+Last-Updated: 2016-08-09
+Forwarded: no
+
+
+Index: libgetdata-0.9.3/bindings/python/pydirfile.c
+===================================================================
+--- libgetdata-0.9.3.orig/bindings/python/pydirfile.c
++++ libgetdata-0.9.3/bindings/python/pydirfile.c
+@@ -270,7 +270,7 @@ static int gdpy_dirfile_init(struct gdpy
+ self->callback_data = pycallback_data;
+ self->callback_exception = 0;
+
+- dirfilename = gdpy_path_from_pyobj(name, self->char_enc);
++ dirfilename = gdpy_path_from_pyobj(name, self->char_enc, 0); // 0=no dup. CHECK
+
+ if (dirfilename == NULL) {
+ dreturn("%i", -1);
+Index: libgetdata-0.9.3/bindings/python/gdpy_intern.h
+===================================================================
+--- libgetdata-0.9.3.orig/bindings/python/gdpy_intern.h
++++ libgetdata-0.9.3/bindings/python/gdpy_intern.h
+@@ -184,7 +184,7 @@ union gdpy_quadruple_value {
+
+ /* Handle filesystem encoding */
+ #if PY_MAJOR_VERSION < 3
+-#define gdpy_path_from_pyobj(o,c) gdpy_string_from_pyobj(o,c,NULL)
++#define gdpy_path_from_pyobj(o,c,d) gdpy_string_from_pyobj(o,c,NULL)
+ #define gdpyobj_from_path PyString_FromString
+ #else
+ extern char *gdpy_path_from_pyobj_(PyObject*, int);
+Index: libgetdata-0.9.3/bindings/python/pyentry.c
+===================================================================
+--- libgetdata-0.9.3.orig/bindings/python/pyentry.c
++++ libgetdata-0.9.3/bindings/python/pyentry.c
+@@ -296,7 +296,7 @@ static void gdpy_set_entry_from_tuple(gd
+ }
+
+ E->EN(linterp,table) = gdpy_path_from_pyobj(PyTuple_GetItem(tuple, 1),
+- char_enc);
++ char_enc, 0 ); // CHECK: no dup?
+
+ if (PyErr_Occurred()) {
+ dreturnvoid();
+@@ -1549,7 +1549,7 @@ static int gdpy_entry_settable(struct gd
+ return -1;
+ }
+
+- s = gdpy_path_from_pyobj(value, self->char_enc);
++ s = gdpy_path_from_pyobj(value, self->char_enc, 0 ); // 0 = no strdup. CHECK
+
+ if (PyErr_Occurred()) {
+ dreturn("%i", -1);
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..a2fba86 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+python3.patch
diff --git a/debian/python-pygetdata.install b/debian/python-pygetdata.install
index 6081e37..7426b41 100644
--- a/debian/python-pygetdata.install
+++ b/debian/python-pygetdata.install
@@ -1 +1 @@
-usr/lib/python*/dist-packages/pygetdata.so
+usr/lib/python2*/dist-packages/pygetdata.so
diff --git a/debian/python3-pygetdata.install b/debian/python3-pygetdata.install
new file mode 100644
index 0000000..e6adaeb
--- /dev/null
+++ b/debian/python3-pygetdata.install
@@ -0,0 +1 @@
+usr/lib/python3*/site-packages/pygetdata*so
diff --git a/debian/rules b/debian/rules
index 364cb65..a7868d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,19 +7,20 @@
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
PYVERS=$(shell pyversions -vr)
+PY3VERS=$(shell py3versions -vr)
%:
- dh $@ --with python2,autotools_dev
+ dh $@ --with python2,python3,autotools_dev
override_dh_auto_configure:
dh_auto_configure -Bbuild-main -- --disable-python --with-perl-dir=vendor
cp src/*.h build-main/src/
- for v in $(PYVERS); do \
+ for v in $(PYVERS) $(PY3VERS); do \
dh_auto_configure -Bbuild-py$$v -- --disable-bindings --enable-python --with-python=/usr/bin/python$$v; \
cp src/*.h build-py$$v/src/; \
done
@@ -30,22 +31,23 @@ override_dh_auto_configure:
override_dh_auto_build:
dh_auto_build -Bbuild-main
- for v in $(PYVERS); do \
+ for v in $(PYVERS) $(PY3VERS); do \
dh_auto_build -Bbuild-py$$v; \
done
override_dh_auto_install:
dh_auto_install -Bbuild-main
- for v in $(PYVERS); do \
+ for v in $(PYVERS) $(PY3VERS); do \
dh_auto_install -Bbuild-py$$v; \
done
dh_numpy
+ dh_numpy3
# rename
mv debian/tmp/usr/lib/python2.7/site-packages \
debian/tmp/usr/lib/python2.7/dist-packages
override_dh_auto_clean:
dh_auto_clean -Bbuild-main
- for v in $(PYVERS); do \
+ for v in $(PYVERS) $(PY3VERS); do \
dh_auto_clean -Bbuild-py$$v; \
done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libgetdata.git
More information about the debian-science-commits
mailing list