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 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 | |
---|
25 | import sys |
---|
26 | import glob |
---|
27 | import os |
---|
28 | import shutil |
---|
29 | try : |
---|
30 | from distutils.core import setup |
---|
31 | except 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 | |
---|
36 | sys.path.insert(0, "pdlanalyzer") |
---|
37 | from pdlanalyzer.version import __version__, __doc__ |
---|
38 | |
---|
39 | data_files = [] |
---|
40 | mofiles = glob.glob(os.sep.join(["po", "*", "*.mo"])) |
---|
41 | for mofile in mofiles : |
---|
42 | lang = mofile.split(os.sep)[1] |
---|
43 | directory = os.sep.join(["share", "locale", lang, "LC_MESSAGES"]) |
---|
44 | data_files.append((directory, [ mofile ])) |
---|
45 | |
---|
46 | docdir = "share/doc/pkpgcounter" |
---|
47 | docfiles = ["README", "COPYING", "BUGS", "CREDITS", "NEWS"] |
---|
48 | data_files.append((docdir, docfiles)) |
---|
49 | |
---|
50 | directory = os.sep.join(["share", "man", "man1"]) |
---|
51 | manpages = glob.glob(os.sep.join(["man", "*.1"])) |
---|
52 | data_files.append((directory, manpages)) |
---|
53 | |
---|
54 | setup(name = "pkpgcounter", version = __version__, |
---|
55 | license = "GNU GPL", |
---|
56 | description = __doc__, |
---|
57 | author = "Jerome Alet", |
---|
58 | author_email = "alet@librelogiciel.com", |
---|
59 | url = "http://www.librelogiciel.com/software/", |
---|
60 | packages = [ "pdlanalyzer" ], |
---|
61 | scripts = [ "bin/pkpgcounter" ], |
---|
62 | data_files = data_files) |
---|