[prev in list] [next in list] [prev in thread] [next in thread]
List: rpmorg-maint
Subject: [Rpm-maint] [PATCH 2/2] Add a python accessor for the source header
From: ebiederm () xmission ! com (Eric W ! Biederman)
Date: 2010-10-10 14:36:34
Message-ID: m139seyv0t.fsf_-_ () fess ! ebiederm ! org
[Download RAW message or body]
Make the source header visible to python code.
---
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 3bba35e..a829539 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 */
};
--
1.7.3.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic