[med-svn] [Git][med-team/vienna-rna][master] 2 commits: Add patch for fixing FTBFS with swig 4.5.0

Andreas Tille (@tille) gitlab at salsa.debian.org
Mon Aug 31 12:40:51 BST 2026



Andreas Tille pushed to branch master at Debian Med / vienna-rna


Commits:
5b0cf159 by Rafael Laboissière at 2026-08-31T07:21:58+02:00
Add patch for fixing FTBFS with swig 4.5.0

Closes: #1145650

- - - - -
f6540c7d by Andreas Tille at 2026-08-31T13:40:41+02:00
Merge branch 'swig-4.5.0' into 'master'

Add patch for fixing FTBFS with swig 4.5.0

See merge request med-team/vienna-rna!1
- - - - -


2 changed files:

- + debian/patches/build-with-swig-4.5.0.patch
- debian/patches/series


Changes:

=====================================
debian/patches/build-with-swig-4.5.0.patch
=====================================
@@ -0,0 +1,621 @@
+Description: Build with swig 4.5.0
+ Without this patch, the package FTBFS with swig 4.5.0. This is due to
+ the removal of the Python 2 compatibility macros in version 4.5.0. [1]
+ According to the SWIG authors, these macros were retained in the
+ generated code (pyhead.swg) solely for user typemaps. All typemap
+ using these macros are updated to call the Python 3 C API
+ directly.
+ .
+ [1] https://github.com/swig/swig/commit/79f7a2b7cb7ddc256eba09c8770133148025171d
+Author: Rafael Laboissière <rafael at debian.org>
+Bug-Debian: https://bugs.debian.org/1145650
+Forwarded: no
+Last-Update: 2026-08-31
+
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python/callbacks-boltzmann-sampling.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python/callbacks-boltzmann-sampling.i
+@@ -53,7 +53,7 @@ python_wrap_bs_cb(const char *structure,
+   func = cb->cb;
+   /* compose argument list */
+   PyObject *py_structure, *py_energy;
+-  py_structure = (structure) ? PyString_FromString(structure) : Py_None;
++  py_structure = (structure) ? PyUnicode_FromString(structure) : Py_None;
+   result       = PyObject_CallFunctionObjArgs(func,
+                                               py_structure,
+                                               (cb->data) ? cb->data : Py_None,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python/callbacks-mfe-window.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python/callbacks-mfe-window.i
+@@ -73,7 +73,7 @@ python_wrap_mfe_window_cb(unsigned int
+   PyObject *py_start, *py_end, *py_structure, *py_energy;
+   py_start      = PyLong_FromUnsignedLong(start);
+   py_end        = PyLong_FromUnsignedLong(end);
+-  py_structure  = PyString_FromString(structure);
++  py_structure  = PyUnicode_FromString(structure);
+   py_energy     = PyFloat_FromDouble((double)energy);
+   result        = PyObject_CallFunctionObjArgs(func,
+                                                py_start,
+@@ -127,7 +127,7 @@ python_wrap_mfe_window_zscore_cb(unsigne
+   PyObject *py_start, *py_end, *py_structure, *py_energy, *py_zscore;
+   py_start = PyLong_FromUnsignedLong(start);
+   py_end   = PyLong_FromUnsignedLong(end);
+-  py_structure  = PyString_FromString(structure);
++  py_structure  = PyUnicode_FromString(structure);
+   py_energy     = PyFloat_FromDouble((double)energy);
+   py_zscore     = PyFloat_FromDouble((double)zscore);
+   result        = PyObject_CallFunctionObjArgs(func,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python/callbacks-subopt.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python/callbacks-subopt.i
+@@ -57,7 +57,7 @@ python_wrap_subopt_cb(const char *struct
+   func  = cb->cb;
+ 
+   /* compose argument list */
+-  py_structure = (structure) ? PyString_FromString(structure) : Py_None;
++  py_structure = (structure) ? PyUnicode_FromString(structure) : Py_None;
+   py_energy    = PyFloat_FromDouble((double)energy);
+   result       = PyObject_CallFunctionObjArgs(func,
+                                               py_structure,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python/tmaps.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python/tmaps.i
+@@ -61,7 +61,7 @@
+     for (i = 0; i < size; i++) {
+       PyObject *o = PyList_GetItem($input,i);
+       if (PyUnicode_Check(o))
+-        $1[i] = PyString_AsString(PyUnicode_AsASCIIString(o));
++        $1[i] = PyBytes_AsString(PyUnicode_AsASCIIString(o));
+       else {
+         PyErr_SetString(PyExc_TypeError,"list must contain strings");
+         free($1);
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/callbacks-boltzmann-sampling.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/callbacks-boltzmann-sampling.i
+@@ -55,7 +55,7 @@ python_wrap_bs_cb(const char *structure,
+   func = cb->cb;
+   /* compose argument list */
+   PyObject *py_structure, *py_energy;
+-  py_structure = (structure) ? PyString_FromString(structure) : Py_None;
++  py_structure = (structure) ? PyUnicode_FromString(structure) : Py_None;
+   result       = PyObject_CallFunctionObjArgs(func,
+                                               py_structure,
+                                               (cb->data) ? cb->data : Py_None,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/callbacks-mfe-window.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/callbacks-mfe-window.i
+@@ -72,9 +72,9 @@ python_wrap_mfe_window_cb(int         st
+   func = cb->cb;
+   /* compose argument list */
+   PyObject *py_start, *py_end, *py_structure, *py_energy;
+-  py_start      = PyInt_FromLong(start);
+-  py_end        = PyInt_FromLong(end);
+-  py_structure  = PyString_FromString(structure);
++  py_start      = PyLong_FromLong(start);
++  py_end        = PyLong_FromLong(end);
++  py_structure  = PyUnicode_FromString(structure);
+   py_energy     = PyFloat_FromDouble((double)energy);
+   result        = PyObject_CallFunctionObjArgs(func,
+                                                py_start,
+@@ -125,9 +125,9 @@ python_wrap_mfe_window_zscore_cb(int
+   func = cb->cb;
+   /* compose argument list */
+   PyObject *py_start, *py_end, *py_structure, *py_energy, *py_zscore;
+-  py_start      = PyInt_FromLong(start);
+-  py_end        = PyInt_FromLong(end);
+-  py_structure  = PyString_FromString(structure);
++  py_start      = PyLong_FromLong(start);
++  py_end        = PyLong_FromLong(end);
++  py_structure  = PyUnicode_FromString(structure);
+   py_energy     = PyFloat_FromDouble((double)energy);
+   py_zscore     = PyFloat_FromDouble((double)zscore);
+   result        = PyObject_CallFunctionObjArgs(func,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/callbacks-pf-window.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/callbacks-pf-window.i
+@@ -101,10 +101,10 @@ python_wrap_pf_window_cb(FLT_OR_DBL   *p
+ 
+   /* compose argument list */
+   PyObject *py_size, *py_i, *py_max, *py_type;
+-  py_size = PyInt_FromLong(pr_size);
+-  py_i    = PyInt_FromLong(i);
+-  py_max  = PyInt_FromLong(max);
+-  py_type = PyInt_FromLong(type);
++  py_size = PyLong_FromLong(pr_size);
++  py_i    = PyLong_FromLong(i);
++  py_max  = PyLong_FromLong(max);
++  py_type = PyLong_FromLong(type);
+   result  = PyObject_CallFunctionObjArgs(func,
+                                          pr_list,
+                                          py_size,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/callbacks-sc.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/callbacks-sc.i
+@@ -604,11 +604,11 @@
+     /* compose argument list */
+     PyObject *py_i, *py_j, *py_k, *py_l, *py_d;
+ 
+-    py_i    = PyInt_FromLong(i);
+-    py_j    = PyInt_FromLong(j);
+-    py_k    = PyInt_FromLong(k);
+-    py_l    = PyInt_FromLong(l);
+-    py_d    = PyInt_FromLong(d);
++    py_i    = PyLong_FromLong(i);
++    py_j    = PyLong_FromLong(j);
++    py_k    = PyLong_FromLong(k);
++    py_l    = PyLong_FromLong(l);
++    py_d    = PyLong_FromLong(d);
+     result  = PyObject_CallFunctionObjArgs(func,
+                                            py_i,
+                                            py_j,
+@@ -642,8 +642,8 @@
+       }
+ 
+       PyErr_Clear();
+-    } else if (PyInt_Check(result)) {
+-      ret = (int)PyInt_AsLong(result);
++    } else if (PyLong_Check(result)) {
++      ret = (int)PyLong_AsLong(result);
+     } else if (PyLong_Check(result)) {
+       ret = (int)PyLong_AsLong(result);
+     } else {
+@@ -679,11 +679,11 @@
+     /* compose argument list */
+     PyObject *py_i, *py_j, *py_k, *py_l, *py_d;
+ 
+-    py_i    = PyInt_FromLong(i);
+-    py_j    = PyInt_FromLong(j);
+-    py_k    = PyInt_FromLong(k);
+-    py_l    = PyInt_FromLong(l);
+-    py_d    = PyInt_FromLong(d);
++    py_i    = PyLong_FromLong(i);
++    py_j    = PyLong_FromLong(j);
++    py_k    = PyLong_FromLong(k);
++    py_l    = PyLong_FromLong(l);
++    py_d    = PyLong_FromLong(d);
+     result  = PyObject_CallFunctionObjArgs(func,
+                                            py_i,
+                                            py_j,
+@@ -739,10 +739,10 @@
+         /* users may also specify base pairs as tuples of size 2 */
+         else if (PyTuple_Check(bp)) {
+           if ((PyTuple_Size(bp) == 2)
+-              && PyInt_Check(PyTuple_GetItem(bp, 0))
+-              && PyInt_Check(PyTuple_GetItem(bp, 1))) {
+-            pairs[num_pairs].i  = (int)PyInt_AsLong(PyTuple_GetItem(bp, 0));
+-            pairs[num_pairs].j  = (int)PyInt_AsLong(PyTuple_GetItem(bp, 1));
++              && PyLong_Check(PyTuple_GetItem(bp, 0))
++              && PyLong_Check(PyTuple_GetItem(bp, 1))) {
++            pairs[num_pairs].i  = (int)PyLong_AsLong(PyTuple_GetItem(bp, 0));
++            pairs[num_pairs].j  = (int)PyLong_AsLong(PyTuple_GetItem(bp, 1));
+             num_pairs++;
+           }
+         }
+@@ -753,9 +753,9 @@
+           bp_i  = PyDict_GetItemString(bp, "i");
+           bp_j  = PyDict_GetItemString(bp, "j");
+           /* both dictionary keys must be present and the corresponding values have to be integer types */
+-          if (bp_i && bp_j && PyInt_Check(bp_i) && PyInt_Check(bp_j)) {
+-            pairs[num_pairs].i  = (int)PyInt_AsLong(bp_i);
+-            pairs[num_pairs].j  = (int)PyInt_AsLong(bp_j);
++          if (bp_i && bp_j && PyLong_Check(bp_i) && PyLong_Check(bp_j)) {
++            pairs[num_pairs].i  = (int)PyLong_AsLong(bp_i);
++            pairs[num_pairs].j  = (int)PyLong_AsLong(bp_j);
+             num_pairs++;
+           }
+         } else {
+@@ -797,11 +797,11 @@
+     /* compose argument list */
+     PyObject *py_i, *py_j, *py_k, *py_l, *py_d;
+ 
+-    py_i  = PyInt_FromLong(i);
+-    py_j  = PyInt_FromLong(j);
+-    py_k  = PyInt_FromLong(k);
+-    py_l  = PyInt_FromLong(l);
+-    py_d  = PyInt_FromLong(d);
++    py_i  = PyLong_FromLong(i);
++    py_j  = PyLong_FromLong(j);
++    py_k  = PyLong_FromLong(k);
++    py_l  = PyLong_FromLong(l);
++    py_d  = PyLong_FromLong(d);
+ 
+     result = PyObject_CallFunctionObjArgs(func,
+                                           py_i,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/callbacks-subopt.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/callbacks-subopt.i
+@@ -57,7 +57,7 @@ python_wrap_subopt_cb(const char *struct
+   func  = cb->cb;
+ 
+   /* compose argument list */
+-  py_structure = (structure) ? PyString_FromString(structure) : Py_None;
++  py_structure = (structure) ? PyUnicode_FromString(structure) : Py_None;
+   py_energy    = PyFloat_FromDouble((double)energy);
+   result       = PyObject_CallFunctionObjArgs(func,
+                                               py_structure,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/callbacks-ud.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/callbacks-ud.i
+@@ -394,9 +394,9 @@ py_wrap_ud_energy(vrna_fold_compound_t *
+   py_vc       = SWIG_NewPointerObj(SWIG_as_voidptr(vc),
+                                    SWIGTYPE_p_vrna_fold_compound_t,
+                                    SWIG_POINTER_NEW);
+-  py_i        = PyInt_FromLong(i);
+-  py_j        = PyInt_FromLong(j);
+-  py_looptype = PyInt_FromLong(looptype);
++  py_i        = PyLong_FromLong(i);
++  py_j        = PyLong_FromLong(j);
++  py_looptype = PyLong_FromLong(looptype);
+   result      = PyObject_CallFunctionObjArgs(func,
+                                              py_vc,
+                                              py_i,
+@@ -426,7 +426,7 @@ py_wrap_ud_energy(vrna_fold_compound_t *
+   } else if (result == Py_None) {
+     throw std::runtime_error( "Unstructured domains energy callback must return pseudo energy value" );
+   } else {
+-    ret = (int)PyInt_AsLong(result);
++    ret = (int)PyLong_AsLong(result);
+   }
+   /* END recognizing errors in callback execution */
+ 
+@@ -454,9 +454,9 @@ py_wrap_ud_exp_energy(vrna_fold_compound
+   py_vc       = SWIG_NewPointerObj(SWIG_as_voidptr(vc),
+                                    SWIGTYPE_p_vrna_fold_compound_t,
+                                    SWIG_POINTER_NEW);
+-  py_i        = PyInt_FromLong(i);
+-  py_j        = PyInt_FromLong(j);
+-  py_looptype = PyInt_FromLong(looptype);
++  py_i        = PyLong_FromLong(i);
++  py_j        = PyLong_FromLong(j);
++  py_looptype = PyLong_FromLong(looptype);
+   result      = PyObject_CallFunctionObjArgs(func,
+                                              py_vc,
+                                              py_i,
+@@ -513,9 +513,9 @@ py_wrap_ud_prob_add(vrna_fold_compound_t
+   py_vc       = SWIG_NewPointerObj(SWIG_as_voidptr(vc),
+                                    SWIGTYPE_p_vrna_fold_compound_t,
+                                    SWIG_POINTER_NEW);
+-  py_i        = PyInt_FromLong(i);
+-  py_j        = PyInt_FromLong(j);
+-  py_looptype = PyInt_FromLong(looptype);
++  py_i        = PyLong_FromLong(i);
++  py_j        = PyLong_FromLong(j);
++  py_looptype = PyLong_FromLong(looptype);
+   py_prob     = PyFloat_FromDouble((double)prob);
+   result      = PyObject_CallFunctionObjArgs(func,
+                                              py_vc,
+@@ -573,10 +573,10 @@ py_wrap_ud_prob_get(vrna_fold_compound_t
+   py_vc       = SWIG_NewPointerObj(SWIG_as_voidptr(vc),
+                                    SWIGTYPE_p_vrna_fold_compound_t,
+                                    SWIG_POINTER_NEW);
+-  py_i        = PyInt_FromLong(i);
+-  py_j        = PyInt_FromLong(j);
+-  py_looptype = PyInt_FromLong(looptype);
+-  py_motif    = PyInt_FromLong(motif);
++  py_i        = PyLong_FromLong(i);
++  py_j        = PyLong_FromLong(j);
++  py_looptype = PyLong_FromLong(looptype);
++  py_motif    = PyLong_FromLong(motif);
+   result      = PyObject_CallFunctionObjArgs(func,
+                                              py_vc,
+                                              py_i,
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/globals-md.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/globals-md.i
+@@ -21,181 +21,181 @@
+ }
+ 
+ %typemap(varin) int pf_smooth {
+-  vrna_md_defaults_pf_smooth(PyInt_AsLong($input));
++  vrna_md_defaults_pf_smooth(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int pf_smooth {
+-  $result = PyInt_FromLong(vrna_md_defaults_pf_smooth_get());
++  $result = PyLong_FromLong(vrna_md_defaults_pf_smooth_get());
+ }
+ 
+ %typemap(varin) int dangles {
+-  vrna_md_defaults_dangles(PyInt_AsLong($input));
++  vrna_md_defaults_dangles(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int dangles {
+-  $result = PyInt_FromLong(vrna_md_defaults_dangles_get());
++  $result = PyLong_FromLong(vrna_md_defaults_dangles_get());
+ }
+ 
+ %typemap(varin) int tetra_loop {
+-  vrna_md_defaults_special_hp(PyInt_AsLong($input));
++  vrna_md_defaults_special_hp(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int tetra_loop {
+-  $result = PyInt_FromLong(vrna_md_defaults_special_hp_get());
++  $result = PyLong_FromLong(vrna_md_defaults_special_hp_get());
+ }
+ 
+ %typemap(varin) int special_hp {
+-  vrna_md_defaults_special_hp(PyInt_AsLong($input));
++  vrna_md_defaults_special_hp(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int special_hp {
+-  $result = PyInt_FromLong(vrna_md_defaults_special_hp_get());
++  $result = PyLong_FromLong(vrna_md_defaults_special_hp_get());
+ }
+ 
+ %typemap(varin) int noLonelyPairs {
+-  vrna_md_defaults_noLP(PyInt_AsLong($input));
++  vrna_md_defaults_noLP(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int noLonelyPairs {
+-  $result = PyInt_FromLong(vrna_md_defaults_noLP_get());
++  $result = PyLong_FromLong(vrna_md_defaults_noLP_get());
+ }
+ 
+ %typemap(varin) int noLP {
+-  vrna_md_defaults_noLP(PyInt_AsLong($input));
++  vrna_md_defaults_noLP(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int noLP {
+-  $result = PyInt_FromLong(vrna_md_defaults_noLP_get());
++  $result = PyLong_FromLong(vrna_md_defaults_noLP_get());
+ }
+ 
+ %typemap(varin) int noGU {
+-  vrna_md_defaults_noGU(PyInt_AsLong($input));
++  vrna_md_defaults_noGU(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int noGU {
+-  $result = PyInt_FromLong(vrna_md_defaults_noGU_get());
++  $result = PyLong_FromLong(vrna_md_defaults_noGU_get());
+ }
+ 
+ %typemap(varin) int no_closingGU {
+-  vrna_md_defaults_noGUclosure(PyInt_AsLong($input));
++  vrna_md_defaults_noGUclosure(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int no_closingGU {
+-  $result = PyInt_FromLong(vrna_md_defaults_noGUclosure_get());
++  $result = PyLong_FromLong(vrna_md_defaults_noGUclosure_get());
+ }
+ 
+ %typemap(varin) int noGUclosure {
+-  vrna_md_defaults_noGUclosure(PyInt_AsLong($input));
++  vrna_md_defaults_noGUclosure(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int noGUclosure {
+-  $result = PyInt_FromLong(vrna_md_defaults_noGUclosure_get());
++  $result = PyLong_FromLong(vrna_md_defaults_noGUclosure_get());
+ }
+ 
+ %typemap(varin) int logML {
+-  vrna_md_defaults_logML(PyInt_AsLong($input));
++  vrna_md_defaults_logML(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int logML {
+-  $result = PyInt_FromLong(vrna_md_defaults_logML_get());
++  $result = PyLong_FromLong(vrna_md_defaults_logML_get());
+ }
+ 
+ %typemap(varin) int circ {
+-  vrna_md_defaults_circ(PyInt_AsLong($input));
++  vrna_md_defaults_circ(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int circ {
+-  $result = PyInt_FromLong(vrna_md_defaults_circ_get());
++  $result = PyLong_FromLong(vrna_md_defaults_circ_get());
+ }
+ 
+ %typemap(varin) int gquad {
+-  vrna_md_defaults_gquad(PyInt_AsLong($input));
++  vrna_md_defaults_gquad(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int gquad {
+-  $result = PyInt_FromLong(vrna_md_defaults_gquad_get());
++  $result = PyLong_FromLong(vrna_md_defaults_gquad_get());
+ }
+ 
+ %typemap(varin) int uniq_ML {
+-  vrna_md_defaults_uniq_ML(PyInt_AsLong($input));
++  vrna_md_defaults_uniq_ML(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int uniq_ML {
+-  $result = PyInt_FromLong(vrna_md_defaults_uniq_ML_get());
++  $result = PyLong_FromLong(vrna_md_defaults_uniq_ML_get());
+ }
+ 
+ %typemap(varin) int energy_set {
+-  vrna_md_defaults_energy_set(PyInt_AsLong($input));
++  vrna_md_defaults_energy_set(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int energy_set {
+-  $result = PyInt_FromLong(vrna_md_defaults_energy_set_get());
++  $result = PyLong_FromLong(vrna_md_defaults_energy_set_get());
+ }
+ 
+ %typemap(varin) int backtrack {
+-  vrna_md_defaults_backtrack(PyInt_AsLong($input));
++  vrna_md_defaults_backtrack(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int backtrack {
+-  $result = PyInt_FromLong(vrna_md_defaults_backtrack_get());
++  $result = PyLong_FromLong(vrna_md_defaults_backtrack_get());
+ }
+ 
+ /* backtrack_type implementation still missing */
+ 
+ %typemap(varin) int do_backtrack {
+-  vrna_md_defaults_compute_bpp(PyInt_AsLong($input));
++  vrna_md_defaults_compute_bpp(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int do_backtrack {
+-  $result = PyInt_FromLong(vrna_md_defaults_compute_bpp_get());
++  $result = PyLong_FromLong(vrna_md_defaults_compute_bpp_get());
+ }
+ 
+ %typemap(varin) int compute_bpp {
+-  vrna_md_defaults_compute_bpp(PyInt_AsLong($input));
++  vrna_md_defaults_compute_bpp(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int compute_bpp {
+-  $result = PyInt_FromLong(vrna_md_defaults_compute_bpp_get());
++  $result = PyLong_FromLong(vrna_md_defaults_compute_bpp_get());
+ }
+ 
+ %typemap(varin) int max_bp_span {
+-  vrna_md_defaults_max_bp_span(PyInt_AsLong($input));
++  vrna_md_defaults_max_bp_span(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int max_bp_span {
+-  $result = PyInt_FromLong(vrna_md_defaults_max_bp_span_get());
++  $result = PyLong_FromLong(vrna_md_defaults_max_bp_span_get());
+ }
+ 
+ %typemap(varin) int min_loop_size {
+-  vrna_md_defaults_min_loop_size(PyInt_AsLong($input));
++  vrna_md_defaults_min_loop_size(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int min_loop_size {
+-  $result = PyInt_FromLong(vrna_md_defaults_min_loop_size_get());
++  $result = PyLong_FromLong(vrna_md_defaults_min_loop_size_get());
+ }
+ 
+ %typemap(varin) int window_size {
+-  vrna_md_defaults_window_size(PyInt_AsLong($input));
++  vrna_md_defaults_window_size(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int window_size {
+-  $result = PyInt_FromLong(vrna_md_defaults_window_size_get());
++  $result = PyLong_FromLong(vrna_md_defaults_window_size_get());
+ }
+ 
+ %typemap(varin) int olAliEn {
+-  vrna_md_defaults_olAliEn(PyInt_AsLong($input));
++  vrna_md_defaults_olAliEn(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int olAliEn {
+-  $result = PyInt_FromLong(vrna_md_defaults_olAliEn_get());
++  $result = PyLong_FromLong(vrna_md_defaults_olAliEn_get());
+ }
+ 
+ %typemap(varin) int ribo {
+-  vrna_md_defaults_ribo(PyInt_AsLong($input));
++  vrna_md_defaults_ribo(PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int ribo {
+-  $result = PyInt_FromLong(vrna_md_defaults_ribo_get());
++  $result = PyLong_FromLong(vrna_md_defaults_ribo_get());
+ }
+ 
+ %typemap(varin) double cv_fact {
+@@ -231,11 +231,11 @@
+ }
+ 
+ %typemap(varin) int saltDPXInit {
+-  vrna_md_defaults_saltDPXInit((int)PyInt_AsLong($input));
++  vrna_md_defaults_saltDPXInit((int)PyLong_AsLong($input));
+ }
+ 
+ %typemap(varout) int saltDPXInit {
+-  $result = PyInt_FromLong((long)vrna_md_defaults_saltDPXInit_get());
++  $result = PyLong_FromLong((long)vrna_md_defaults_saltDPXInit_get());
+ }
+ 
+ %typemap(varin) double saltDPXInitFact {
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/Python2/tmaps.i
++++ vienna-rna-2.7.0+dfsg/interfaces/Python2/tmaps.i
+@@ -69,8 +69,8 @@
+     $1 = (char **) malloc((size+1)*sizeof(char *));
+     for (i = 0; i < size; i++) {
+       PyObject *o = PyList_GetItem($input,i);
+-      if (PyString_Check(o))
+-        $1[i] = PyString_AsString(PyList_GetItem($input,i));
++      if (PyBytes_Check(o))
++        $1[i] = PyBytes_AsString(PyList_GetItem($input,i));
+       else {
+         PyErr_SetString(PyExc_TypeError,"list must contain strings");
+         free($1);
+--- vienna-rna-2.7.0+dfsg.orig/interfaces/inverse.i
++++ vienna-rna-2.7.0+dfsg/interfaces/inverse.i
+@@ -95,7 +95,7 @@ strncpy(symbolset, "AUGC", sizeof(char)
+ }
+ 
+ %typemap(varout) char * symbolset {
+-  $result = SWIG_Python_str_FromChar((const char *)symbolset);
++  $result = PyUnicode_FromString((const char *)symbolset);
+ }
+ #endif
+ 
+--- vienna-rna-2.7.0+dfsg.orig/src/RNAxplorer/interfaces/distorted_sampling.i
++++ vienna-rna-2.7.0+dfsg/src/RNAxplorer/interfaces/distorted_sampling.i
+@@ -25,15 +25,15 @@ void computeDistortion(vrna_fold_compoun
+ 			if($1->landscape[i][j].num_structs > 0){
+ 				PyObject* cellList = PyTuple_New(4);
+ 				
+-				PyObject* pK = PyInt_FromLong($1->landscape[i][j].k);
+-				PyObject* pL = PyInt_FromLong($1->landscape[i][j].l);
++				PyObject* pK = PyLong_FromLong($1->landscape[i][j].k);
++				PyObject* pL = PyLong_FromLong($1->landscape[i][j].l);
+ 				
+ 				double num = $1->landscape[i][j].mfe;
+ 				PyObject* pMFE = PyFloat_FromDouble(num);
+ 				
+ 				PyObject* structureList = PyList_New($1->landscape[i][j].num_structs);
+ 				for(int k = 0; k < $1->landscape[i][j].num_structs; k++){
+-					PyObject* pStr = PyString_FromString($1->landscape[i][j].structures[k]);
++					PyObject* pStr = PyUnicode_FromString($1->landscape[i][j].structures[k]);
+ 					PyList_SetItem(structureList,k,pStr);
+ 					free($1->landscape[i][j].structures[k]);
+ 				}
+--- vienna-rna-2.7.0+dfsg.orig/src/RNAxplorer/interfaces/distorted_samplingMD.i
++++ vienna-rna-2.7.0+dfsg/src/RNAxplorer/interfaces/distorted_samplingMD.i
+@@ -28,8 +28,8 @@
+     $1 = (char **) malloc((size+1)*sizeof(char *));
+     for (i = 0; i < size; i++) {
+       PyObject *o = PyList_GetItem($input,i);
+-      if (PyString_Check(o))
+-        $1[i] = PyString_AsString(PyList_GetItem($input,i));
++      if (PyBytes_Check(o))
++        $1[i] = PyBytes_AsString(PyList_GetItem($input,i));
+       else {
+         PyErr_SetString(PyExc_TypeError,"list must contain strings");
+         free($1);
+@@ -61,15 +61,15 @@
+ 			if($1->landscape[i][j].num_structs > 0){
+ 				PyObject* cellList = PyTuple_New(4);
+ 				
+-				PyObject* pK = PyInt_FromLong($1->landscape[i][j].k);
+-				PyObject* pL = PyInt_FromLong($1->landscape[i][j].l);
++				PyObject* pK = PyLong_FromLong($1->landscape[i][j].k);
++				PyObject* pL = PyLong_FromLong($1->landscape[i][j].l);
+ 				
+ 				double num = $1->landscape[i][j].mfe;
+ 				PyObject* pMFE = PyFloat_FromDouble(num);
+ 				
+ 				PyObject* structureList = PyList_New($1->landscape[i][j].num_structs);
+ 				for(int k = 0; k < $1->landscape[i][j].num_structs; k++){
+-					PyObject* pStr = PyString_FromString($1->landscape[i][j].structures[k]);
++					PyObject* pStr = PyUnicode_FromString($1->landscape[i][j].structures[k]);
+ 					PyList_SetItem(structureList,k,pStr);
+ 					free($1->landscape[i][j].structures[k]);
+ 				}
+--- vienna-rna-2.7.0+dfsg.orig/src/RNAxplorer/interfaces/paths.i
++++ vienna-rna-2.7.0+dfsg/src/RNAxplorer/interfaces/paths.i
+@@ -12,7 +12,7 @@
+ 		float e = $1[i].en;
+ 		char* s = $1[i].s;
+ 		PyObject* energy = PyFloat_FromDouble(e);
+-		PyObject* structure = PyString_FromString(s);
++		PyObject* structure = PyUnicode_FromString(s);
+ 		PyObject* tupel = PyTuple_New(2);
+ 		PyTuple_SET_ITEM(tupel,0,structure);
+ 		PyTuple_SET_ITEM(tupel,1,energy); 


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ use_debian_packaged_dlib.patch
 python3.11.patch
 gcc-15.patch
 missing_include_header.patch
+build-with-swig-4.5.0.patch



View it on GitLab: https://salsa.debian.org/med-team/vienna-rna/-/compare/f34e0e86bee827435cb1a0dc878553f6d0ee452a...f6540c7d993501f7f42a417424da23fdd8ca894d

-- 
View it on GitLab: https://salsa.debian.org/med-team/vienna-rna/-/compare/f34e0e86bee827435cb1a0dc878553f6d0ee452a...f6540c7d993501f7f42a417424da23fdd8ca894d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260831/950cd425/attachment-0001.htm>


More information about the debian-med-commit mailing list