[packagekit] What-Provides for Python modules?

Anders F Björklund afb at algonet.se
Sat Jul 23 02:37:26 PDT 2011


Richard Hughes wrote:

>> To make PackageKit support this, I would add a new enum
>> "PK_PROVIDES_PYTHON". Python tools which do e.g. "import xapian" can then
>> search for a package providing Xapian using the search-string "xapian". To
>> specify the Python version, the search would have to be "python3(xapian)".
> 
> I think mandating the use of either python3() or python2() is a good idea.

That should probably be python3() and python(), to match existing ?

>> To be useful, backends need to implement this feature, so: Which backend
>> does and which does not support searching for Python dependencies? Backends
>> need to store metadata about Python modules somewhere... (In APT, Python
>> modules can be searched via the package-name itself)
> 
> In yum, I guess adding the provides to the python packages makes
> sense, but certainly searching my filename would be a good workaround.

Unfortunately, the metadata shipped by Fedora only provides perl()
but not python() - except for ABI (major Python version) that is...

RPM can do this automatically, if one provides a dependency extractor.
Here's a simple variant: http://www.algonet.se/~afb/rpm/pythondeps.py

Like with the perldeps.pl, there's plenty of being-wrong opportunities.

--anders




More information about the PackageKit mailing list