Skip to content

Commit

Permalink
Python Stable ABI: Build for Stable ABI, require Python 3.7+
Browse files Browse the repository at this point in the history
  • Loading branch information
encukou committed Oct 3, 2023
1 parent 6394b1d commit 8343d71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8343d71

Please sign in to comment.