From 75375dd8b5de90c17375544b3d9f5a68026d74ac Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Wed, 28 Sep 2005 16:01:33 +0000 Subject: [PATCH] =?UTF-8?q?=20scons=20i=C3=A7in=20trivial=20pisi=20api'?= =?UTF-8?q?=C4=B1..=20daha=20bakaca=C4=9F=C4=B1z..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/actionsapi/scons.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pisi/actionsapi/scons.py diff --git a/pisi/actionsapi/scons.py b/pisi/actionsapi/scons.py new file mode 100644 index 00000000..d23b4627 --- /dev/null +++ b/pisi/actionsapi/scons.py @@ -0,0 +1,35 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Copyright (C) 2005, TUBITAK/UEKAE +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# Please read the COPYING file. + + +# Pisi Modules +import pisi.context as ctx + +# ActionsAPI Modules +from pisi.actionsapi.shelltools import system + + +class MakeError(pisi.actionsapi.Error): + def __init__(self, Exception): + ctx.ui.error(Exception) + +class InstallError(pisi.actionsapi.Error): + def __init__(self, Exception): + ctx.ui.error(Exception) + +def make(parameters = ''): + if system("scons %s", % parameters): + raise MakeError('!!! Make failed...\n') + +def install(parameters = 'install'): + if system("scons %s", % parameters): + raise InstallError('!!! Install failed...\n')