[med-svn] [Git][med-team/librcsb-core-wrapper][master] 3 commits: Attempt to port to Python3

Andreas Tille gitlab at salsa.debian.org
Sun Oct 6 08:32:58 BST 2019



Andreas Tille pushed to branch master at Debian Med / librcsb-core-wrapper


Commits:
1dc50069 by Andreas Tille at 2019-10-05T15:39:37Z
Attempt to port to Python3

- - - - -
38f1b056 by Andreas Tille at 2019-10-06T07:31:26Z
Refresh patch

- - - - -
a045d67d by Andreas Tille at 2019-10-06T07:32:31Z
Add TODO to d/changelog

- - - - -


11 changed files:

- debian/changelog
- debian/control
- debian/patches/gcc-8.patch
- + debian/patches/python3.patch
- debian/patches/series
- debian/patches/setup.py.in
- debian/python-corepywrap-dbg.install → debian/python3-corepywrap-dbg.install
- debian/python-corepywrap.README.Debian → debian/python3-corepywrap.README.Debian
- debian/python-corepywrap.examples → debian/python3-corepywrap.examples
- debian/python-corepywrap.install → debian/python3-corepywrap.install
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+librcsb-core-wrapper (1.005-7) UNRELEASED; urgency=medium
+
+  * Switch wrapper from Python2 to Python3
+  TODO: Somehow python2.7 is used anyway to build the package - no idea why
+
+ -- Andreas Tille <tille at debian.org>  Tue, 01 Oct 2019 22:24:28 +0200
+
 librcsb-core-wrapper (1.005-6) unstable; urgency=medium
 
   * Team uploade


=====================================
debian/control
=====================================
@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 10),
                dh-python,
                libboost-python-dev,
                libxerces-c-dev,
-               python-all-dev,
+               python3-all-dev,
                libtool,
                libtool-bin,
                bison,
@@ -58,18 +58,18 @@ Description: documentation for librcsb-core-wrapper0
  .
  This package contains html documentation.
 
-Package: python-corepywrap
+Package: python3-corepywrap
 Architecture: any
 Section: python
 Depends: ${shlibs:Depends},
          ${misc:Depends},
-         ${python:Depends},
+         ${python3:Depends},
          librcsb-core-wrapper0 (= ${binary:Version})
 Suggests: librcsb-core-wrapper-doc
-Provides: ${python:Provides}
-Description: library that exports C++ mmCIF accessors to Python
+Provides: ${python3:Provides}
+Description: library that exports C++ mmCIF accessors to Python3
  The RCSB Core Wrapper library was developed to provide an object-oriented
  application interface to information in mmCIF format. It includes several
  classes for accessing data dictionaries and mmCIF format data files.
  .
- This library provides Python bindings for librcsb-core-wrapper.
+ This library provides Python3 bindings for librcsb-core-wrapper.


=====================================
debian/patches/gcc-8.patch
=====================================
@@ -3,9 +3,9 @@ Description: Stop building with -Werror
 Author: Adrian Bunk <bunk at debian.org>
 Bug-Debian: https://bugs.debian.org/897795
 
---- librcsb-core-wrapper.orig/etc/make.platform.gnu4
-+++ librcsb-core-wrapper/etc/make.platform.gnu4
-@@ -34,7 +34,7 @@
+--- a/etc/make.platform.gnu4
++++ b/etc/make.platform.gnu4
+@@ -34,7 +34,7 @@ ABI=
  
  # WARNINGS_AS_ERRORS defines flags to instruct all compilers to treat all
  # warnings as errors.


=====================================
debian/patches/python3.patch
=====================================
@@ -0,0 +1,38 @@
+--- a/Makefile
++++ b/Makefile
+@@ -59,9 +59,9 @@ compile_osx:
+ compile_lnx_38:
+ 	@sh -c 'cd ./$(UTIL_MODULE); \
+          export PIC=-fPIC;  \
+-         export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
++         export WWPDB_PYTHON_INC=/usr/include/python3.7; \
+          export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
+-         export WWPDB_PYTHON_LIB=python2.5; \
++         export WWPDB_PYTHON_LIB=python3.7; \
+          export WWPDB_BOOST_INC=/apps/boost_1_38_0/include/boost-1_38; \
+          export WWPDB_BOOST_PYTHON_LIB_DIR=/apps/boost_1_38_0/lib; \
+          export WWPDB_BOOST_PYTHON_LIB=boost_python-gcc41-mt-1_38; \
+@@ -73,9 +73,9 @@ compile_lnx_38:
+ compile_lnx_41:
+ 	@sh -c 'cd ./$(UTIL_MODULE); \
+         export PIC=-fPIC; \
+-        export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
++        export WWPDB_PYTHON_INC=/usr/include/python3.7; \
+ 	export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
+-        export WWPDB_PYTHON_LIB=python2.5; \
++        export WWPDB_PYTHON_LIB=python3.7; \
+         export WWPDB_BOOST_INC=/apps/boost/include/boost-1_41; \
+         export WWPDB_BOOST_PYTHON_LIB_DIR=/apps/boost/lib; \
+         export WWPDB_BOOST_PYTHON_LIB=boost_python-gcc41-mt-1_41; \
+@@ -88,9 +88,9 @@ compile_lnx_41:
+ compile_wwpdb_py27:
+ 	@sh -c 'cd ./$(UTIL_MODULE); \
+         export PIC=-fPIC; \
+-        export WWPDB_PYTHON_INC=$(TOP_INSTALL_DIR)/include/python2.7; \
++        export WWPDB_PYTHON_INC=$(TOP_INSTALL_DIR)/include/python3.7; \
+ 	export WWPDB_PYTHON_LIB_DIR=$(TOP_INSTALL_DIR)/lib; \
+-        export WWPDB_PYTHON_LIB=python2.7; \
++        export WWPDB_PYTHON_LIB=python3.7; \
+         export WWPDB_BOOST_INC=$(TOP_INSTALL_DIR)/include; \
+         export WWPDB_BOOST_PYTHON_LIB_DIR=$(TOP_INSTALL_DIR)/lib; \
+         export WWPDB_BOOST_PYTHON_LIB=boost_python-mt; \


=====================================
debian/patches/series
=====================================
@@ -15,3 +15,4 @@ regcomp_cert_fix.patch
 gcc5.patch
 xerces32.patch
 gcc-8.patch
+python3.patch


=====================================
debian/patches/setup.py.in
=====================================
@@ -4,7 +4,7 @@ Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-Au
 --- /dev/null
 +++ librcsb-core-wrapper/wrapper/python/setup.py.in
 @@ -0,0 +1,49 @@
-+#!/usr/bin/python
++#!/usr/bin/python3
 +
 +from distutils import sysconfig
 +from distutils.core import setup, Extension
@@ -32,7 +32,7 @@ Forwarded: http://lists.alioth.debian.org/pipermail/debian-med-packaging/2012-Au
 +source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
 +source_list = [os.path.join("src", s) for s in source_list if s.endswith(".C")]
 +
-+# g++ -O  -fPIC -ansi -Werror -Wall -Wno-deprecated   -DHAVE_STRCASECMP -DINCL_TEMPLATE_SRC -DHAVE_PLACEMENT_NEW  -I./include -I../include -I/usr/include/python2.7 -I/apps/boost/include/boost-1_41   -ftemplate-depth-128 -fno-inline -Wall -c src/TypeCodePyWrap.C -o ./obj/TypeCodePyWrap.o
++# g++ -O  -fPIC -ansi -Werror -Wall -Wno-deprecated   -DHAVE_STRCASECMP -DINCL_TEMPLATE_SRC -DHAVE_PLACEMENT_NEW  -I./include -I../include -I/usr/include/python3.7 -I/apps/boost/include/boost-1_41   -ftemplate-depth-128 -fno-inline -Wall -c src/TypeCodePyWrap.C -o ./obj/TypeCodePyWrap.o
 +# g++ -shared -L/apps/boost/lib -L/apps/xerces-3.0.1/lib TypeCodePyWrap.o StlPyWrap.o CharPyWrap.o RcsbFilePyWrap.o ISTablePyWrap.o TableFilePyWrap.o CifFilePyWrap.o DicFilePyWrap.o DictObjFilePyWrap.o DataInfoPyWrap.o CifDataInfoPyWrap.o DictDataInfoPyWrap.o PdbMlFilePyWrap.o CorePyWrap.o -L../../lib/.libs -lrcsb-core-wrapper -lboost_python-mt-py27 -lxerces-c -lutil -lpthread -ldl -o ../lib/CorePyWrap.so
 +extra_cmd = '@DEFINES@'
 +


=====================================
debian/python-corepywrap-dbg.install → debian/python3-corepywrap-dbg.install
=====================================


=====================================
debian/python-corepywrap.README.Debian → debian/python3-corepywrap.README.Debian
=====================================
@@ -1,12 +1,12 @@
 RCSB Core Wrapper for Debian
 ============================
 
-Testing the Python binding
+Testing the Python3 binding
 --------------------------
 After installation, you can test the Python binding like this:
 
  1: mkdir -p /tmp/test && pushd /tmp/test && mkdir -p ../data
  2: wget -O ../data/2j01.cif.gz http://www.rcsb.org/pdb/files/2J01.cif.gz
  3: gunzip ../data/2j01.cif.gz
- 4: python /usr/share/doc/python-corepywrap/examples/CorePyWrapTests.py
+ 4: python3 /usr/share/doc/python-corepywrap/examples/CorePyWrapTests.py
  5: popd


=====================================
debian/python-corepywrap.examples → debian/python3-corepywrap.examples
=====================================


=====================================
debian/python-corepywrap.install → debian/python3-corepywrap.install
=====================================


=====================================
debian/rules
=====================================
@@ -11,7 +11,7 @@ PYVERSIONS=$(shell pyversions -vr)
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
-	dh $@ --with python2
+	dh $@ --with python3
 
 override_dh_auto_build: override_dh_auto_build-nopy override_dh_auto_build-py
 



View it on GitLab: https://salsa.debian.org/med-team/librcsb-core-wrapper/compare/6286969b38e674a10694d9bda011e4b3c78932c2...a045d67df6ff97a8a64a15626530ce05e3798e99

-- 
View it on GitLab: https://salsa.debian.org/med-team/librcsb-core-wrapper/compare/6286969b38e674a10694d9bda011e4b3c78932c2...a045d67df6ff97a8a64a15626530ce05e3798e99
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/20191006/63316974/attachment-0001.html>


More information about the debian-med-commit mailing list