Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
Attempt to port to Python3
· 1dc50069
Andreas Tille
authored
Oct 05, 2019
1dc50069
Refresh patch
· 38f1b056
Andreas Tille
authored
Oct 06, 2019
38f1b056
Add TODO to d/changelog
· a045d67d
Andreas Tille
authored
Oct 06, 2019
a045d67d
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
a045d67d
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@debian.org> Tue, 01 Oct 2019 22:24:28 +0200
librcsb-core-wrapper (1.005-6) unstable; urgency=medium
* Team uploade
...
...
debian/control
View file @
a045d67d
...
...
@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 10),
dh-python,
libboost-python-dev,
libxerces-c-dev,
python-all-dev,
python
3
-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: python
3
-corepywrap
Architecture: any
Section: python
Depends: ${shlibs:Depends},
${misc:Depends},
${python:Depends},
${python
3
:Depends},
librcsb-core-wrapper0 (= ${binary:Version})
Suggests: librcsb-core-wrapper-doc
Provides: ${python:Provides}
Description: library that exports C++ mmCIF accessors to Python
Provides: ${python
3
:Provides}
Description: library that exports C++ mmCIF accessors to Python
3
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 Python
3
bindings for librcsb-core-wrapper.
debian/patches/gcc-8.patch
View file @
a045d67d
...
...
@@ -3,9 +3,9 @@ Description: Stop building with -Werror
Author: Adrian Bunk <bunk@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 → 100644
View file @
a045d67d
--- 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
View file @
a045d67d
...
...
@@ -15,3 +15,4 @@ regcomp_cert_fix.patch
gcc5.patch
xerces32.patch
gcc-8.patch
python3.patch
debian/patches/setup.py.in
View file @
a045d67d
...
...
@@ -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/python
3
+
+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/python
2
.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/python
3
.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/python
3
-corepywrap-dbg.install
View file @
a045d67d
File moved
debian/python-corepywrap.README.Debian
→
debian/python
3
-corepywrap.README.Debian
View file @
a045d67d
RCSB Core Wrapper for Debian
============================
Testing the Python binding
Testing the Python
3
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: python
3
/usr/share/doc/python-corepywrap/examples/CorePyWrapTests.py
5: popd
debian/python-corepywrap.examples
→
debian/python
3
-corepywrap.examples
View file @
a045d67d
File moved
debian/python-corepywrap.install
→
debian/python
3
-corepywrap.install
View file @
a045d67d
File moved
debian/rules
View file @
a045d67d
...
...
@@ -11,7 +11,7 @@ PYVERSIONS=$(shell pyversions -vr)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@ --with python
2
dh $@ --with python
3
override_dh_auto_build: override_dh_auto_build-nopy override_dh_auto_build-py
...
...