[med-svn] [Git][med-team/ghmm][master] 5 commits: fix-test-mcmc.patch: new: fix missing imports.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Tue Mar 12 22:05:34 GMT 2024



Étienne Mollier pushed to branch master at Debian Med / ghmm


Commits:
0087650a by Étienne Mollier at 2024-03-12T22:39:54+01:00
fix-test-mcmc.patch: new: fix missing imports.

Closes: #1065974

- - - - -
162fe929 by Étienne Mollier at 2024-03-12T22:54:08+01:00
python3.12.patch: new: fix remaining failures.

There were a couple of occurrences of calls to obsolet APIs causing
build failures.

- - - - -
38daae13 by Étienne Mollier at 2024-03-12T23:02:07+01:00
d/control: move to pkgconf.

- - - - -
607814d2 by Étienne Mollier at 2024-03-12T23:02:18+01:00
d/s/lintian-overrides: new: hide new error.

The lintian error looks to be a side effect of necessary changes for
the 64-bit time_t transition.

- - - - -
a33a7e10 by Étienne Mollier at 2024-03-12T23:04:57+01:00
ready to upload to unstable.

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/fix-test-mcmc.patch
- + debian/patches/python3.12.patch
- debian/patches/series
- + debian/source/lintian-overrides


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+ghmm (0.9~rc3-6) unstable; urgency=medium
+
+  * Team upload.
+  * fix-test-mcmc.patch: new: fix missing imports. (Closes: #1065974)
+  * python3.12.patch: new: fix remaining failures.
+    There were a couple of occurrences of calls to obsolet APIs causing
+    build failures.
+  * d/control: move to pkgconf.
+  * d/s/lintian-overrides: new: hide new error.
+    The lintian error looks to be a side effect of necessary changes for
+    the 64-bit time_t transition.
+
+ -- Étienne Mollier <emollier at debian.org>  Tue, 12 Mar 2024 23:02:56 +0100
+
 ghmm (0.9~rc3-5.1) unstable; urgency=medium
 
   * Non-maintainer upload.


=====================================
debian/control
=====================================
@@ -7,7 +7,7 @@ Build-Depends: dpkg-dev (>= 1.22.5), debhelper-compat (= 13),
                dh-sequence-python3,
                d-shlibs (>= 0.106~),
                python3-dev,
-               pkg-config,
+               pkgconf,
                libxml2-dev,
                libgsl-dev,
                liblapacke-dev,


=====================================
debian/patches/fix-test-mcmc.patch
=====================================
@@ -0,0 +1,62 @@
+--- ghmm.orig/tests/mcmc.c
++++ ghmm/tests/mcmc.c
+@@ -14,6 +14,8 @@
+ #include <ghmm/foba.h>
+ #include <ghmm/reestimate.h>
+ #include <ghmm/obsolete.h>
++#include <ghmm/fbgibbs.h>
++#include <ghmm/cfbgibbs.h>
+ 
+ #include <time.h>//time
+ int* getList(char* fileName, int count){
+--- ghmm.orig/ghmmwrapper/sclass_change.c
++++ ghmm/ghmmwrapper/sclass_change.c
+@@ -95,7 +95,7 @@
+    if (pModule == NULL) {   
+      printf("C: Importing Python module ... ");
+     
+-     pName = PyString_FromString(ModuleName);
++     pName = PyUnicode_FromString(ModuleName);
+    
+      pModule = PyImport_Import(pName);       /* Import module */
+      if(!pModule) {
+@@ -130,16 +130,16 @@
+    }    
+    PyTuple_SetItem(pArgs, 0, pList); 
+ 
+-   pValue = PyInt_FromLong((long)k);
++   pValue = PyLong_FromLong((long)k);
+    PyTuple_SetItem(pArgs, 1, pValue); 
+ 
+-   pValue = PyInt_FromLong((long)t);
++   pValue = PyLong_FromLong((long)t);
+    PyTuple_SetItem(pArgs, 2, pValue); 
+    
+    pValue = PyObject_CallObject(pFunc, pArgs); // Calling Python 
+ 
+    /* parsing the result from Python to C data type */
+-   class = PyInt_AsLong(pValue);
++   class = PyLong_AsLong(pValue);
+   /*printf("C: The returned class is %d\n",class);*/
+      
+    /* cleaning up */
+@@ -211,16 +211,16 @@
+    }    
+    PyTuple_SetItem(pArgs, 0, pList); 
+ 
+-   pValue = PyInt_FromLong((long)k);
++   pValue = PyLong_FromLong((long)k);
+    PyTuple_SetItem(pArgs, 1, pValue); 
+ 
+-   pValue = PyInt_FromLong((long)t);
++   pValue = PyLong_FromLong((long)t);
+    PyTuple_SetItem(pArgs, 2, pValue); 
+    
+    pValue = PyObject_CallObject(pyCallback, pArgs); // Calling Python 
+ 
+    /* parsing the result from Python to C data type */
+-   class = PyInt_AsLong(pValue);
++   class = PyLong_AsLong(pValue);
+    /*printf("C: The returned class is %d\n",class);*/
+    
+    if (class == -1)  {


=====================================
debian/patches/python3.12.patch
=====================================
@@ -0,0 +1,63 @@
+--- ghmm.orig/ghmm/smodel.c
++++ ghmm/ghmm/smodel.c
+@@ -2069,13 +2069,13 @@
+    pFunc = PyDict_GetItemString(pDict, FunctionName);
+ 
+    pArgs = PyTuple_New(1);
+-   pValue = PyInt_FromLong(pos);
++   pValue = PyLong_FromLong(pos);
+ 
+    PyTuple_SetItem(pArgs, 0, pValue); 
+    pValue = PyObject_CallObject(pFunc, pArgs); /* Calling Python */
+ 
+    /* parsing the result from Python to C data type
+-   class = PyInt_AsLong(pValue);
++   class = PyLong_AsLong(pValue);
+    printf("C: The returned class is %d\n",class); */
+      
+    /*Py_Finalize();         */
+--- ghmm.orig/ghmmwrapper/wrapper_arrays.i
++++ ghmm/ghmmwrapper/wrapper_arrays.i
+@@ -14,13 +14,13 @@
+     }     
+     for (i = 0; i < $2; i++) {
+       PyObject *o = PySequence_GetItem($input,i);
+-      if (!PyInt_Check(o)) {
++      if (!PyLong_Check(o)) {
+          Py_XDECREF(o);
+          PyErr_SetString(PyExc_ValueError,"Expecting a sequence of integers");
+          free($1);
+          return NULL;
+       }
+-      $1[i] = (int)PyInt_AsLong(o);
++      $1[i] = (int)PyLong_AsLong(o);
+       Py_DECREF(o);
+     }
+   }
+@@ -41,7 +41,7 @@
+     if (result) {
+         $result = PyList_New(*$1);
+         for (i=0; i<*$1; i++) {
+-            PyList_SetItem($result, i, PyInt_FromLong(result[i]));
++            PyList_SetItem($result, i, PyLong_FromLong(result[i]));
+         }
+     }
+     else {
+@@ -67,8 +67,8 @@
+             Py_DECREF(o);
+         }
+         // conversion from int to double is without loss
+-        else if (PyInt_Check(o)) {
+-            $1[i] = (double)PyInt_AsLong(o);
++        else if (PyLong_Check(o)) {
++            $1[i] = (double)PyLong_AsLong(o);
+             Py_DECREF(o);
+         }
+         else {
+@@ -161,4 +161,4 @@
+ %}
+ %enddef
+ MATRIX(int)
+-MATRIX(double)
+\ No newline at end of file
++MATRIX(double)


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,5 @@ python3_build_system.patch
 lapacke.patch
 python3_syntax.patch
 # setuptools.patch
+fix-test-mcmc.patch
+python3.12.patch


=====================================
debian/source/lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+# libghmm1 is the package name prior 64-bit time_t transition.
+ghmm source: version-substvar-for-external-package Conflicts ${source:Version} libghmm1t64 -> libghmm1 [debian/control:56]



View it on GitLab: https://salsa.debian.org/med-team/ghmm/-/compare/c9de8903821fd7baab39295d8a5b566336319994...a33a7e103e7aa53d8df4c6aea9fe09aefb594e7b

-- 
View it on GitLab: https://salsa.debian.org/med-team/ghmm/-/compare/c9de8903821fd7baab39295d8a5b566336319994...a33a7e103e7aa53d8df4c6aea9fe09aefb594e7b
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/20240312/12df3380/attachment-0001.htm>


More information about the debian-med-commit mailing list