From 56fa35747bec6074bbecf5bdd3ff21af62837123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Thu, 17 Nov 2005 16:33:46 +0000 Subject: [PATCH] after fixing MANIFEST.in, let's also make sure that we are installing the postscripts of the latex docs --- setup.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index c2d60733..b018d828 100755 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ class Install(install): def run(self): install.run(self) self.installi18n() + self.installdoc() def installi18n(self): for lang in i18n_languages.split(' '): @@ -60,10 +61,22 @@ class Install(install): shutil.copy("po/%s.mo" % lang, os.path.join(destpath, "%s.mo" % i18n_domain)) def installdoc(self): #TODO: not decided if we have to - pass - #for tex in glob.glob('doc/*.tex'): - # print tex - + os.chdir('doc') + for tex in glob.glob('*.tex'): + print 'Compiling', tex + os.system('latex %s' % tex) + dvi = tex[:-3] + 'dvi' + ps = tex[:-3] + 'ps' + os.system('dvips %s -o %s' % (dvi, ps)) + destpath = os.path.join(self.root, "usr/share/doc/pisi") + try: + os.makedirs(destpath) + except: + pass + print 'Installing', ps + shutil.copy(ps, os.path.join(destpath, ps)) + os.chdir('..') + setup(name="pisi", version= getVersion(), description="PISI (Packages Installed Successfully as Intended)",