Mailinglist Archive: opensuse-packaging (132 mails)

< Previous Next >
Re: [opensuse-packaging] Re: How can I find the python package to satisfy a missing python script dependency?

On 09/01/2017 20:42, Christian Boltz wrote:

Am Montag, 9. Januar 2017, 15:47:27 CET schrieb jan matejek:
On 9.1.2017 11:00, Dave Plater wrote:
The script with this header works on my local machine but fails in
obs, how can I find the python package that provides
xml.etree.ElementTree :

import xml.etree.ElementTree as etree
I don't think there is a general tool to do this. It might be worth
writing one for situations where you're looking for a package that you
don't have installed. There's some work in Fedora that I'm looking to
adopt, to automatically figure out pythonic dependencies.
There is a very generic tool that might help - pin ;-)

First, get ARCHIVES.gz for your openSUSE version, for example
and save it in /var/lib/pin/

Then run
pin 'xml.etree.ElementTree.*py'
and pin will grep for that in ARCHIVES.gz.

Note that the actual path actually contains xml/etree/ or
xml/etree/ElementTree/, which is why I proposed to use ".*py"
and not just ".py". (Of course, you can search without the ".*py", but
that might give you false positives.) Also, the dots are actually
slashes, but a regex-dot matches any char which makes things a bit
easier ;-)


Christian Boltz
This is useful if the script fails on my local machine but Jan's method works if it succeeds on my machine and fails in obs.
Dave P
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >