root / pkpgcounter / trunk / setup.py @ 948

Revision 564, 2.6 kB (checked in by jerome, 17 years ago)

Changed copyright years.
Removed unnecessary shebang lines.
Changed default encoding to UTF-8 from ISO-8859-15 (only
ascii is used anyway).

  • Property svn:executable set to *
  • Property svn:keywords set to Auth Date Id Rev
Line 
1#! /usr/bin/env python
2# -*- coding: UTF-8 -*-
3#
4# pkpgcounter : a generic Page Description Language parser
5#
6# (c) 2003, 2004, 2005, 2006, 2007, 2008 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 3 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, see <http://www.gnu.org/licenses/>.
19#
20# $Id$
21#
22#
23
24import sys
25import glob
26import os
27import shutil
28try :
29    from distutils.core import setup
30except ImportError, msg :   
31    sys.stderr.write("%s\n" % msg)
32    sys.stderr.write("You need the DistUtils Python module.\nunder Debian, you may have to install the python-dev package.\nOf course, YMMV.\n")
33    sys.exit(-1)
34   
35try :   
36    from PIL import Image
37except ImportError :   
38    sys.stderr.write("You need the Python Imaging Library (aka PIL).\nYou can grab it from http://www.pythonware.com\n")
39    sys.exit(-1)
40   
41try :   
42    import psyco
43except ImportError :   
44    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")
45   
46sys.path.insert(0, "pkpgpdls")
47from pkpgpdls.version import __version__, __doc__
48
49data_files = []
50mofiles = glob.glob(os.sep.join(["po", "*", "*.mo"]))
51for mofile in mofiles :
52    lang = mofile.split(os.sep)[1]
53    directory = os.sep.join(["share", "locale", lang, "LC_MESSAGES"])
54    data_files.append((directory, [ mofile ]))
55   
56docdir = "share/doc/pkpgcounter"   
57docfiles = ["README", "COPYING", "BUGS", "CREDITS", "NEWS"]
58data_files.append((docdir, docfiles))
59
60directory = os.sep.join(["share", "man", "man1"])
61manpages = glob.glob(os.sep.join(["man", "*.1"]))   
62data_files.append((directory, manpages))
63
64setup(name = "pkpgcounter", version = __version__,
65      license = "GNU GPL",
66      description = __doc__,
67      author = "Jerome Alet",
68      author_email = "alet@librelogiciel.com",
69      url = "http://www.pykota.com/software/pkpgcounter/",
70      packages = [ "pkpgpdls" ],
71      scripts = [ "bin/pkpgcounter" ],
72      data_files = data_files)
73     
Note: See TracBrowser for help on using the browser.