See https://sourceforge.net/p/pam-python/tickets/5/ --- /tmp/pam-python-1.0.8/src/pam_python.c 2020-11-10 01:58:10.000000000 -0800 +++ pam-python-1.0.8/src/pam_python.c 2021-01-18 09:19:27.082023704 -0800 @@ -104,7 +104,7 @@ #define Py23_String_FromStringAndSize PyUnicode_FromStringAndSize #define Py23_String_GET_SIZE PyUnicode_GET_SIZE #define Py23_String_Parse_Char "U" -#define Py23_String_Size PyUnicode_Size +#define Py23_String_Size PyBytes_Size #define Py23_String_Type PyUnicode_Type #define Py23_TYPE(p) Py_TYPE(p) #endif @@ -434,7 +434,7 @@ * Just print the exception in some recognisable form, hopefully. */ syslog_open(module_path); - if (PyClass_Check(ptype)) + if (PyType_Check(ptype)) stype = PyObject_GetAttrString(ptype, "__name__"); else { @@ -876,7 +876,7 @@ value = 0; else { - value = Py23_String_AsString(pyValue); + value = (char*) Py23_String_AsString(pyValue); if (value == 0) { snprintf( Only in /home/dan/chroot-cauldron/tmp/pam-python-1.0.8/src: pam_python.so diff -ru /tmp/pam-python-1.0.8/src/setup.py /home/dan/chroot-cauldron/tmp/pam-python-1.0.8/src/setup.py --- /tmp/pam-python-1.0.8/src/setup.py 2020-11-10 01:58:10.000000000 -0800 +++ pam-python-1.0.8/src/setup.py 2021-01-18 09:08:21.485867575 -0800 @@ -1,4 +1,4 @@ -#!/usr/bin/python2 -W default +#!/usr/bin/python3 -W default import warnings; warnings.simplefilter('default') import distutils.sysconfig Only in /home/dan/chroot-cauldron/tmp/pam-python-1.0.8/src: test-pam_python.pam diff -ru /tmp/pam-python-1.0.8/src/test.py /home/dan/chroot-cauldron/tmp/pam-python-1.0.8/src/test.py --- /tmp/pam-python-1.0.8/src/test.py 2020-11-10 01:58:10.000000000 -0800 +++ pam-python-1.0.8/src/test.py 2021-01-18 09:08:17.370729760 -0800 @@ -1,4 +1,4 @@ -#!/usr/bin/python2 -W default +#!/usr/bin/python3 -W default # # This is the test script for libpython-pam. There aren't many stones # left unturned. diff --git a/pam_python/src/setup.py b/pam_python/src/setup.py index 38fcddd..496ec6c 100755 --- pam_python/src/setup.py +++ pam_python/src/setup.py @@ -38,7 +38,7 @@ ext_modules = [ include_dirs = [], library_dirs=[], define_macros=[('LIBPYTHON_SO','"'+libpython_so+'"')] + Py_DEBUG, - libraries=["pam","python%d.%d" % sys.version_info[:2]], + libraries=["pam","python%d" % sys.version_info[:1]], ), ] setup(