On Saturday 28 October 2006 12:12 pm, Jeremy Kloth wrote:
> On Thursday 26 October 2006 3:43 pm, Richard Jones wrote:
> > On Thursday 26 October 2006 14:51, Tim Cera wrote:
> > > It would really be nice for a project that I am working on to get the
> > > package requirements from XMLRPC. What are the issues with adding the
> > > requirements to XMLPRC?
> >
> > Someone has to write the code. I check it, commit it and install it.
>
> The attached patch adds the 'requires', 'provides' and 'obsoletes' fields
> to the release_data() RPC method.
>
> Note this is untested, but copied from webui.py where is builds the
> PKG-INFO.
Maybe this time I'll attach the patch, not the whole file. :)
--
Jeremy Kloth
http://4suite.org/
Index: rpc.py
===================================================================
--- rpc.py (revision 430)
+++ rpc.py (working copy)
@@ -52,6 +52,9 @@
def release_data(store, package_name, version):
info = store.get_package(package_name, version).as_dict()
del info['description_html']
+ for col in ('requires', 'provides', 'obsoletes'):
+ rows = store.get_release_relationships(package_name, version, col)
+ info[col] = [row['specifier'] for row in rows]
classifiers = [r[0] for r in store.get_release_classifiers(package_name,
version)]
info['classifiers' ] = classifiers
_______________________________________________
Catalog-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/catalog-sig