From 55af03e9223e1f5e8ff10cead58126f8cf31363d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20D=C3=B6nmez?= Date: Mon, 14 May 2007 23:24:13 +0000 Subject: [PATCH] =?UTF-8?q?pisi.conf=20varsa=20=C3=BCzerine=20yazma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 26903009..8ac4eb52 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ class Install(install): self.installi18n() self.installdoc() self.generateConfigFile() - + def installi18n(self): for name in os.listdir('po'): if not name.endswith('.po'): @@ -49,7 +49,7 @@ class Install(install): os.makedirs(destpath) os.chdir('doc') for pdf in glob.glob('*.pdf'): - print 'Installing', pdf + print 'Installing', pdf shutil.copy(pdf, os.path.join(destpath, pdf)) os.chdir('..') @@ -58,8 +58,12 @@ class Install(install): destpath = os.path.join(self.root, "etc/pisi/") if not os.path.exists(destpath): os.makedirs(destpath) - pisiconf = open(os.path.join(destpath, "pisi.conf"), "w") + confFile = os.path.join(destpath, "pisi.conf") + if os.path.isfile(confFile): # Don't overwrite existing pisi.conf + return + + pisiconf = open(confFile, "w") klasses = inspect.getmembers(pisi.configfile, inspect.isclass) defaults = [klass for klass in klasses if klass[0].endswith('Defaults')]