View previous topic :: View next topic |
Author |
Message |
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 253
|
Posted: Tue Apr 02, 2024 6:17 am Post subject: portage python module documentation |
|
|
I have seen some nifty python scripts here and there, depending on import portage.
I would like to learn more about the portage python interface, but I can't find the documentation for it.
EDIT: Formatting cleanup.
Last edited by bstaletic on Tue Apr 02, 2024 10:04 am; edited 1 time in total |
|
Back to top |
|
|
Banana Veteran
Joined: 21 May 2004 Posts: 1407 Location: Germany
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30966 Location: here
|
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 253
|
Posted: Tue Apr 02, 2024 10:08 am Post subject: |
|
|
Thanks to both of you!
That API doc by zmedico will be useful, but it seems more a reference rather than a comprehensive documentation.
The funtoo page looks very interesting! |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Tue Apr 02, 2024 2:26 pm Post subject: |
|
|
The API doc is just auto-generated from the sources and code comments, not much in terms of actual documentation. In particular you'll have a hard time figuring out how the different components interact with each other and how to properly use them.
The Funtoo page on the other hand just covers some very basic functions, and also looks quite outdated (referencing what I was using 15+ years ago when the python codebase consisted of basically just two huge files). Not sure the examples there still work without additional initialization code. Unfortunately the modularization that has happened since to improve performance and maintainability also made it difficult to find the proper entry points to get started. Back in the day you could just open emerge, locate the action you were interested in and look for the individual classes/functions in portage.py. |
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 253
|
Posted: Tue Apr 02, 2024 6:17 pm Post subject: |
|
|
Genone wrote: | The API doc is just auto-generated from the sources and code comments, not much in terms of actual documentation. In particular you'll have a hard time figuring out how the different components interact with each other and how to properly use them. |
That much was painfully obvious.
Genone wrote: | The Funtoo page on the other hand just covers some very basic functions, and also looks quite outdated (referencing what I was using 15+ years ago when the python codebase consisted of basically just two huge files). Not sure the examples there still work without additional initialization code. |
The things from the Funtoo page work fine, as far as I can tell, based on what I have tried today.
It was enough for what I wanted to do. I'm sure that's just scratching the surface. |
|
Back to top |
|
|
|