diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2010-10-10 07:36:34 -0700 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-10-12 10:54:50 +0300 |
commit | 4c155d9ca8db9e5672e1f278ef76b68dd828f863 (patch) | |
tree | cfd56e1387b6e40c2ca83241101cb9d7ddc41617 /python | |
parent | 7293d4aaf590d63d48cc707578008e7d1021b435 (diff) | |
download | librpm-tizen-4c155d9ca8db9e5672e1f278ef76b68dd828f863.tar.gz librpm-tizen-4c155d9ca8db9e5672e1f278ef76b68dd828f863.tar.bz2 librpm-tizen-4c155d9ca8db9e5672e1f278ef76b68dd828f863.zip |
Add a python accessor for the source header
Make the source header visible to python code.
Diffstat (limited to 'python')
-rw-r--r-- | python/spec-py.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/spec-py.c b/python/spec-py.c index 3bba35e92..a8295390c 100644 --- a/python/spec-py.c +++ b/python/spec-py.c @@ -184,6 +184,11 @@ static PyObject * spec_get_packages(specObject *s, void *closure) return pkgList; } +static PyObject * spec_get_source_header(specObject *s, void *closure) +{ + return makeHeader(rpmSpecSourceHeader(s->spec)); +} + static char spec_doc[] = "RPM Spec file object"; static PyGetSetDef spec_getseters[] = { @@ -193,6 +198,7 @@ static PyGetSetDef spec_getseters[] = { {"install", (getter) spec_get_install, NULL, NULL }, {"clean", (getter) spec_get_clean, NULL, NULL }, {"packages", (getter) spec_get_packages, NULL, NULL }, + {"sourceHeader", (getter) spec_get_source_header, NULL, NULL }, {NULL} /* Sentinel */ }; |