root / pkpgcounter / trunk / setup.py @ 458

Revision 443, 2.6 kB (checked in by jerome, 18 years ago)

Changed copyright years.

  • Property svn:executable set to *
  • Property svn:keywords set to Auth Date Id Rev
Line 
1#! /usr/bin/env python
2# -*- coding: ISO-8859-15 -*-
3#
4# pkpgcounter : a generic Page Description Language parser
5#
6# (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet <alet@librelogiciel.com>
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20#
21# $Id$
22#
23#
24
25import sys
26import glob
27import os
28import shutil
29try :
30    from distutils.core import setup
31except ImportError, msg :   
32    sys.stderr.write("%s\n" % msg)
33    sys.stderr.write("You need the DistUtils Python module.\nunder Debian, you may have to install the python-dev package.\nOf course, YMMV.\n")
34    sys.exit(-1)
35   
36try :   
37    from PIL import Image
38except ImportError :   
39    sys.stderr.write("You need the Python Imaging Library (aka PIL).\nYou can grab it from http://www.pythonware.com\n")
40    sys.exit(-1)
41   
42try :   
43    import psyco
44except ImportError :   
45    sys.stderr.write("WARN: If you are running on a 32 Bits x86 platform, you should install the Python Psyco module if possible, this would greatly speedup parsing. NB : Psyco doesn't work on other platforms, so don't worry if you're in this case.\n")
46   
47sys.path.insert(0, "pkpgpdls")
48from pkpgpdls.version import __version__, __doc__
49
50data_files = []
51mofiles = glob.glob(os.sep.join(["po", "*", "*.mo"]))
52for mofile in mofiles :
53    lang = mofile.split(os.sep)[1]
54    directory = os.sep.join(["share", "locale", lang, "LC_MESSAGES"])
55    data_files.append((directory, [ mofile ]))
56   
57docdir = "share/doc/pkpgcounter"   
58docfiles = ["README", "COPYING", "BUGS", "CREDITS", "NEWS"]
59data_files.append((docdir, docfiles))
60
61directory = os.sep.join(["share", "man", "man1"])
62manpages = glob.glob(os.sep.join(["man", "*.1"]))   
63data_files.append((directory, manpages))
64
65setup(name = "pkpgcounter", version = __version__,
66      license = "GNU GPL",
67      description = __doc__,
68      author = "Jerome Alet",
69      author_email = "alet@librelogiciel.com",
70      url = "http://www.pykota.com/software/pkpgcounter/",
71      packages = [ "pkpgpdls" ],
72      scripts = [ "bin/pkpgcounter" ],
73      data_files = data_files)
74     
Note: See TracBrowser for help on using the browser.