rpm-software-management / rpm-web

RPM web content
http://rpm.org
10 stars 24 forks source link

Add real-life examples of Python RPM #54

Closed FrostyX closed 3 months ago

FrostyX commented 4 months ago

After a discussion with @ffesti on DevConf, I am adding a collection of real-life examples of how Python RPM can be used.

pmatilai commented 4 months ago

I think real-life examples belong to https://github.com/rpm-software-management/rpm/tree/master/python/examples

FrostyX commented 4 months ago

Personally, I'd prefer them directly in the documentation (assuming the page supports syntax highlighting) but I don't object to having them in the repository you linked. But in that case, we have to improve their discoverability. For example, it would be nice if both the documentation and the Doxygen documentation could both mention it.

To be honest, the python-related links in the documentation

RPM Python slideset / tutorial by Paul Nasrat (2004) Programming RPM with Python from Fedora RPM Guide

and the Doxygen documentation which is the first google result for "python rpm API" are basically unusable for the end user. The real-life examples should be the first thing they find.

ffesti commented 4 months ago

They should be in the main repo as proper Python files and be linked more prominently. If they are in the main repo they will also get installed locally. Let's concentrate on that first and look at how to integrate them into the docs a s a second step. We want to integrate the C API docs better anyway. So there will be some changes in that area and we can then find a nice place for these Python examples while at it.

ffesti commented 4 months ago

Simply having a link to https://github.com/rpm-software-management/rpm/tree/master/python/examples or text linking to the single files on GH is a quick and dirty solution. We do want something better ofc but that might be a first step to make this accessible right away.

FrostyX commented 4 months ago

Sounds good. I will create a PR to https://github.com/rpm-software-management/rpm/tree/master/python/examples and we can continue there.

FrostyX commented 4 months ago

I submitted https://github.com/rpm-software-management/rpm/pull/3177

ffesti commented 3 months ago

This has moved to the RPM main repositiory. Closing here.