[zypp-devel] Access to zypp from python
Hi, Are there any plans on making zypp python bindings, or maybe there is some work already done? I need to do some simple repository queries from a python script, like retrieving a package version number or downloading debuginfo packages. I believe I can do this with PycURL(libcurl), but it seems for me like a rather hacky way. Any suggestion about what is the right way to solve my issue? Thanks. -- Regards, Nikolay Derkach -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Nikolay Derkach <nderkach@gmail.com> [Aug 03. 2008 17:54]:
Hi,
Are there any plans on making zypp python bindings, or maybe there is some work already done?
There is http://svn.opensuse.org/svn/zypp/trunk/libzypp-bindings/ which gives you swig-based bidings for all of zypp.
I need to do some simple repository queries from a python script, like retrieving a package version number or downloading debuginfo packages. I believe I can do this with PycURL(libcurl), but it seems for me like a rather hacky way. Any suggestion about what is the right way to solve my issue?
You can also give the sat-solver bindings (at http://svn.opensuse.org/svn/zypp/trunk/sat-solver/bindings/) at try. These give you lower-level - but faster - access to the dependency solver and packages. Klaus -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Sun, Aug 3, 2008 at 11:48 PM, Klaus Kaempf <kkaempf@suse.de> wrote:
There is http://svn.opensuse.org/svn/zypp/trunk/libzypp-bindings/ which gives you swig-based bidings for all of zypp.
Thanks, I'll try that. By the way, is it possible to make those bindings work with libzypp from 11.0 (link against libzypp 4.26.7)? Updating the whole libzypp stack will lead to a major breakage. -- Regards, Nikolay Derkach -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Indeed, looks like that's impossible, it seems like these bindings are under heavy development and by the time when 11.0 was released they weren't ready yet, hopefully the bindings and libzypp API will stabilize by 11.1 release. Also, I tried examples from libzypp-bindings/examples/python/ but they throw an exception: Traceback (most recent call last): File "list_updates.py", line 15, in <module> Z.addResolvables( Z.target().resolvables(), True ) File "/usr/lib64/python2.5/site-packages/zypp.py", line 2328, in <lambda> __getattr__ = lambda self, name: _swig_getattr(self, ZYpp_Ptr, name) File "/usr/lib64/python2.5/site-packages/zypp.py", line 34, in _swig_getattr raise AttributeError,name AttributeError: addResolvables I'm using packages from zypp:svn. -- Regards, Nikolay Derkach -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Klaus Kaempf
-
Nikolay Derkach