Mailinglist Archive: opensuse-packaging (132 mails)
< Previous | Next > |
[opensuse-packaging] Re: How can I find the python package to satisfy a missing python script dependency?
- From: jan matejek <jmatejek@xxxxxxxx>
- Date: Mon, 9 Jan 2017 15:47:27 +0100
- Message-id: <434c3b9c-cb0c-ed27-a521-15a991c0165b@suse.com>
On 9.1.2017 11:00, Dave Plater wrote:
if you have a machine where the necessary package is installed, you can
do this:
$ python2
ask rpm about this file and it will give you the right package.
There is an alternate spelling of "import": "from A.B.C import D"
In that case, you can't generally ask about D.__file__, so instead
"import A.B.C" and ask about "A.B.C.__file__".
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.
m.
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
if you have a machine where the necessary package is installed, you can
do this:
$ python2
'/usr/lib64/python2.7/xml/etree/ElementTree.pyc'import xml.etree.ElementTree
xml.etree.ElementTree.__file__
ask rpm about this file and it will give you the right package.
There is an alternate spelling of "import": "from A.B.C import D"
In that case, you can't generally ask about D.__file__, so instead
"import A.B.C" and ask about "A.B.C.__file__".
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.
m.
< Previous | Next > |