[med-svn] [Git][med-team/pdb2pqr][master] 2 commits: Another fix suggested by Scott (thanks a lot)
Andreas Tille
gitlab at salsa.debian.org
Fri Dec 13 08:10:47 GMT 2019
Andreas Tille pushed to branch master at Debian Med / pdb2pqr
Commits:
35e1491b by Andreas Tille at 2019-12-13T07:30:25Z
Another fix suggested by Scott (thanks a lot)
- - - - -
24971340 by Andreas Tille at 2019-12-13T08:10:02Z
Fix some issues with C++ compatibility of Python3
- - - - -
1 changed file:
- debian/patches/2to3.patch
Changes:
=====================================
debian/patches/2to3.patch
=====================================
@@ -13728,7 +13728,8 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
+ for (k,v) in list(dict.items()):
contents = contents.replace(k, v)
try:
- f = open(targetfile, 'wb')
+- f = open(targetfile, 'wb')
++ f = open(targetfile, 'w')
f.write(contents)
f.close()
except:
@@ -14626,3 +14627,49 @@ Last-Update: Thu, 12 Dec 2019 15:41:47 +0100
-Alias('complete-test', testList)
\ No newline at end of file
+Alias('complete-test', testList)
+--- a/pdb2pka/substruct/Algorithms.cpp
++++ b/pdb2pka/substruct/Algorithms.cpp
+@@ -136,7 +136,7 @@ static PyObject *find_max_clique(PyObjec
+
+ for (int i=0; i<cliq.size; i++) {
+ cerr << cliq.vertex[i] << " ";
+- PyList_Append(erg, PyInt_FromLong(cliq.vertex[i]));
++ PyList_Append(erg, PyLong_FromLong(cliq.vertex[i]));
+ }
+
+ for(int i = 0; i < n; i++) {
+@@ -242,7 +242,7 @@ static PyObject *find_cliques(PyObject *
+ PyObject* cli = PyList_New(0);
+
+ for (int j=0; j < collector.cliques[i].size; j++) {
+- PyList_Append(cli, PyInt_FromLong(collector.cliques[i].vertex[j]));
++ PyList_Append(cli, PyLong_FromLong(collector.cliques[i].vertex[j]));
+ }
+
+ PyList_Append(result, cli);
+@@ -299,10 +299,24 @@ static PyMethodDef ModuleMethods[] = {
+ };
+
+ /*----------------------------------------------------------------------------*/
++
++// Followed
++// https://stackoverflow.com/questions/28305731/compiler-cant-find-py-initmodule-is-it-deprecated-and-if-so-what-should-i
++// to replace Py_InitModule
++
++static struct PyModuleDef cModMethods =
++{
++ PyModuleDef_HEAD_INIT,
++ MODULE_STR, /* name of module */
++ "", /* module documentation, may be NULL */
++ -1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
++ ModuleMethods
++};
++
+ PyMODINIT_FUNC MODULE_INIT()
+ {
+
+- PyObject *ThisModule = Py_InitModule( MODULE_STR , ModuleMethods);
++ PyObject *ThisModule = PyModule_Create(&cModMethods);
+ PyObject *ModuleDict = PyModule_GetDict(ThisModule);
+
+ // for correct handling of Numpy
View it on GitLab: https://salsa.debian.org/med-team/pdb2pqr/compare/7df19812ecf8b2435338b691b6316451922ca930...2497134056ff92e64a5953e1b8dea3179d5aa377
--
View it on GitLab: https://salsa.debian.org/med-team/pdb2pqr/compare/7df19812ecf8b2435338b691b6316451922ca930...2497134056ff92e64a5953e1b8dea3179d5aa377
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/20191213/6ba5ad15/attachment-0001.html>
More information about the debian-med-commit
mailing list