summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-10-18 15:12:04 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-10-20 14:02:03 +0300
commite31fb5b75898bfa09180dba02475c6d01764d94f (patch)
tree31e14cc7e4d07deff6478e1919d0b833f1898c25 /python
parent0f13fd37d2f182ad3cd237fb4d32c56314bf94ca (diff)
downloadrpm-e31fb5b75898bfa09180dba02475c6d01764d94f.tar.gz
Generate Python egg-info from cmake builds
To compensate for the loss of egg-info from the python distutils build, create one by ourselves. Not bothering with autotools for this, we need to start sunsetting that side of things and that starts right here.
Diffstat (limited to 'python')
-rw-r--r--python/CMakeLists.txt5
-rw-r--r--python/rpm.egg-info.in10
2 files changed, 15 insertions, 0 deletions
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index ac655c45d..443f94404 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -25,3 +25,8 @@ install(TARGETS _rpm
DESTINATION ${Python3_SITEARCH}/rpm)
install(FILES rpm/transaction.py rpm/__init__.py
DESTINATION ${Python3_SITEARCH}/rpm)
+
+set(egginfo ${PROJECT_NAME}-${PROJECT_VERSION}-py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.egg-info)
+configure_file(rpm.egg-info.in ${egginfo} @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${egginfo}
+ DESTINATION ${Python3_SITEARCH})
diff --git a/python/rpm.egg-info.in b/python/rpm.egg-info.in
new file mode 100644
index 000000000..7678c458f
--- /dev/null
+++ b/python/rpm.egg-info.in
@@ -0,0 +1,10 @@
+Metadata-Version: 1.0
+Name: @PROJECT_NAME@
+Version: @PROJECT_VERSION@
+Summary: Python bindings for rpm
+Home-page: @PROJECT_HOMEPAGE_URL@
+Author: Rpm community
+Author-email: rpm-maint@lists.rpm.org
+License: GNU General Public License v2
+Description: Python bindings for rpm
+Platform: UNKNOWN