diff --git a/var/spack/repos/builtin/packages/clingo/package.py b/var/spack/repos/builtin/packages/clingo/package.py index 4a41089737..238f6748ad 100644 --- a/var/spack/repos/builtin/packages/clingo/package.py +++ b/var/spack/repos/builtin/packages/clingo/package.py @@ -37,6 +37,8 @@ class Clingo(CMakePackage): depends_on('python', type=("build", "link", "run"), when="+python") extends('python', when='+python') + patch('python38.patch', when="@5.3:5.4") + def patch(self): # Doxygen is optional but can't be disabled with a -D, so patch # it out if it's really supposed to be disabled diff --git a/var/spack/repos/builtin/packages/clingo/python38.patch b/var/spack/repos/builtin/packages/clingo/python38.patch new file mode 100644 index 0000000000..6593a57647 --- /dev/null +++ b/var/spack/repos/builtin/packages/clingo/python38.patch @@ -0,0 +1,13 @@ +diff --git a/libpyclingo/pyclingo.cc b/libpyclingo/pyclingo.cc +index 9480203..6a7068c 100644 +--- a/libpyclingo/pyclingo.cc ++++ b/libpyclingo/pyclingo.cc +@@ -1177,7 +1177,7 @@ PyTypeObject ObjectBase::type = { + sizeof(T), // tp_basicsize + 0, // tp_itemsize + PythonDetail::Get_tp_dealloc::value, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_print + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare