diff --git a/CMakeLists.txt b/CMakeLists.txt index 96f5df6979..98331d0d3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,7 @@ endif() list(APPEND db_backends dummy) if (ENABLE_PYTHON) - find_package(Python3 3.2 COMPONENTS Interpreter Development REQUIRED) + find_package(Python3 3.7 COMPONENTS Interpreter Development REQUIRED) endif() if (WITH_CAP) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 4149a88141..acc003ad64 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -17,7 +17,10 @@ Python3_add_library(_rpm rpmver-py.c rpmver-py.h spec-py.c spec-py.h ) - + +# Select Python stable ABI +target_compile_definitions(_rpm PRIVATE Py_LIMITED_API=0x03070000) + target_link_libraries(_rpm PRIVATE librpmio librpm librpmbuild librpmsign) install(TARGETS _rpm