diff --git a/dnf.spec b/dnf.spec index d756ec012a..e3ac036039 100644 --- a/dnf.spec +++ b/dnf.spec @@ -363,6 +363,7 @@ popd %{_bindir}/%{name}-3 %{_bindir}/%{name}4 %exclude %{python3_sitelib}/%{name}/automatic +%{python3_sitelib}/%{name}-*.dist-info %{python3_sitelib}/%{name}/ %dir %{py3pluginpath} %dir %{py3pluginpath}/__pycache__ diff --git a/dnf/CMakeLists.txt b/dnf/CMakeLists.txt index b423bdd92b..ed464a4f0b 100644 --- a/dnf/CMakeLists.txt +++ b/dnf/CMakeLists.txt @@ -3,6 +3,15 @@ INSTALL (FILES ${dnf_SRCS} DESTINATION ${PYTHON_INSTALL_DIR}/dnf) # const.py is generated so the glob alone won't see it: INSTALL (FILES const.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf) +# Generate dist-info metadata +SET(DISTINFO_PATH "${CMAKE_CURRENT_BINARY_DIR}/dnf-${DNF_VERSION}.dist-info") +SET(METADATA_FILE "${DISTINFO_PATH}/METADATA") +FILE(MAKE_DIRECTORY ${DISTINFO_PATH}) +FILE(WRITE ${METADATA_FILE} "Metadata-Version: 2.1\n") +FILE(APPEND ${METADATA_FILE} "Name: dnf\n") +FILE(APPEND ${METADATA_FILE} "Version: ${DNF_VERSION}\n") +INSTALL(DIRECTORY ${DISTINFO_PATH} DESTINATION ${PYTHON_INSTALL_DIR}) + ADD_SUBDIRECTORY (automatic) ADD_SUBDIRECTORY (cli) ADD_SUBDIRECTORY (conf)