root / pkpgcounter / trunk / setup.py @ 282

Revision 271, 2.4 kB (checked in by jerome, 19 years ago)

Now warns about psyco missing only during setup, and stays quiet while running.

  • 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 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    import psyco
38except ImportError :   
39    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")
40
41sys.path.insert(0, "pkpgpdls")
42from pkpgpdls.version import __version__, __doc__
43
44data_files = []
45mofiles = glob.glob(os.sep.join(["po", "*", "*.mo"]))
46for mofile in mofiles :
47    lang = mofile.split(os.sep)[1]
48    directory = os.sep.join(["share", "locale", lang, "LC_MESSAGES"])
49    data_files.append((directory, [ mofile ]))
50   
51docdir = "share/doc/pkpgcounter"   
52docfiles = ["README", "COPYING", "BUGS", "CREDITS", "NEWS"]
53data_files.append((docdir, docfiles))
54
55directory = os.sep.join(["share", "man", "man1"])
56manpages = glob.glob(os.sep.join(["man", "*.1"]))   
57data_files.append((directory, manpages))
58
59setup(name = "pkpgcounter", version = __version__,
60      license = "GNU GPL",
61      description = __doc__,
62      author = "Jerome Alet",
63      author_email = "alet@librelogiciel.com",
64      url = "http://www.librelogiciel.com/software/",
65      packages = [ "pkpgpdls" ],
66      scripts = [ "bin/pkpgcounter" ],
67      data_files = data_files)
Note: See TracBrowser for help on using the browser.