1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
Author: Michael R. Crusoe
Last-Update: 2019-12-14 21:42:08 +0100
Bug-Debian: https://bugs.debian.org/936910
Description: Switch from Python2 to Python3
--- librcsb-core-wrapper.orig/Makefile
+++ librcsb-core-wrapper/Makefile
@@ -59,9 +59,9 @@
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_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_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; \
--- librcsb-core-wrapper.orig/cctbx/scitbx/boost_python/container_conversions.h
+++ librcsb-core-wrapper/cctbx/scitbx/boost_python/container_conversions.h
@@ -150,13 +150,12 @@
|| PyTuple_Check(obj_ptr)
|| PyIter_Check(obj_ptr)
|| PyRange_Check(obj_ptr)
- || ( !PyString_Check(obj_ptr)
- && !PyUnicode_Check(obj_ptr)
- && ( obj_ptr->ob_type == 0
- || obj_ptr->ob_type->ob_type == 0
- || obj_ptr->ob_type->ob_type->tp_name == 0
+ || ( !PyUnicode_Check(obj_ptr)
+ && ( Py_TYPE(obj_ptr) == 0
+ || Py_TYPE(Py_TYPE(obj_ptr)) == 0
+ || Py_TYPE(Py_TYPE(obj_ptr))->tp_name == 0
|| std::strcmp(
- obj_ptr->ob_type->ob_type->tp_name,
+ Py_TYPE(Py_TYPE(obj_ptr))->tp_name,
"Boost.Python.class") != 0)
&& PyObject_HasAttrString(obj_ptr, "__len__")
&& PyObject_HasAttrString(obj_ptr, "__getitem__")))) return 0;
|