summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <proyvind@moondrake.org>2017-04-02 10:58:19 +0200
committerPanu Matilainen <pmatilai@redhat.com>2017-04-04 10:37:26 +0300
commitee206c6b93fe6c4c7ae98920945f168362057b5d (patch)
treec99bfe6515db495febcb6db11f7047f0513c7fb4
parentd2f48e93d32e222d4727b9684d2032f9bb9fc498 (diff)
downloadrpm-ee206c6b93fe6c4c7ae98920945f168362057b5d.tar.gz
add a spec.parsed setter for retrieving parsed spec
-rw-r--r--python/spec-py.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/spec-py.c b/python/spec-py.c
index 29503e281..47c17400f 100644
--- a/python/spec-py.c
+++ b/python/spec-py.c
@@ -163,6 +163,12 @@ static PyObject * getSection(rpmSpec spec, int section)
Py_RETURN_NONE;
}
+static PyObject *
+spec_get_parsed(specObject * s, void *closure)
+{
+ return getSection(s->spec, RPMBUILD_NONE);
+}
+
static PyObject *
spec_get_prep(specObject * s, void *closure)
{
@@ -255,6 +261,7 @@ static char spec_doc[] = "RPM Spec file object";
static PyGetSetDef spec_getseters[] = {
{"sources", (getter) spec_get_sources, NULL, NULL },
+ {"parsed", (getter) spec_get_parsed, NULL, NULL},
{"prep", (getter) spec_get_prep, NULL, NULL },
{"build", (getter) spec_get_build, NULL, NULL },
{"install", (getter) spec_get_install, NULL, NULL },