1 | #! /usr/bin/env python |
---|
2 | # -*- coding: ISO-8859-15 -*- |
---|
3 | |
---|
4 | """Packaging and installation script for PyKotIcon.""" |
---|
5 | |
---|
6 | # PyKotIcon - Client side helper for PyKota |
---|
7 | # |
---|
8 | # (c) 2003, 2004, 2005, 2006 Jerome Alet <alet@librelogiciel.com> |
---|
9 | # This program is free software; you can redistribute it and/or modify |
---|
10 | # it under the terms of the GNU General Public License as published by |
---|
11 | # the Free Software Foundation; either version 2 of the License, or |
---|
12 | # (at your option) any later version. |
---|
13 | # |
---|
14 | # This program is distributed in the hope that it will be useful, |
---|
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | # GNU General Public License for more details. |
---|
18 | # |
---|
19 | # You should have received a copy of the GNU General Public License |
---|
20 | # along with this program; if not, write to the Free Software |
---|
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
---|
22 | # |
---|
23 | # $Id$ |
---|
24 | # |
---|
25 | # |
---|
26 | |
---|
27 | from distutils.core import setup |
---|
28 | import sys |
---|
29 | import os |
---|
30 | import glob |
---|
31 | try : |
---|
32 | import py2exe |
---|
33 | except ImportError : |
---|
34 | if sys.platform == "win32" : |
---|
35 | sys.stderr.write("py2exe is not installed ! ABORTING.\n") |
---|
36 | sys.exit(-1) |
---|
37 | else : |
---|
38 | directory = os.sep.join(["share", "pykoticon"]) |
---|
39 | withPy2EXE = False |
---|
40 | else : |
---|
41 | directory = "." |
---|
42 | withPy2EXE = True |
---|
43 | |
---|
44 | version = "1.00" |
---|
45 | |
---|
46 | setupDictionary = { "name" : "pykoticon", |
---|
47 | "version" : version, |
---|
48 | "license" : "GNU GPL", |
---|
49 | "description" : "a generic, networked, cross-platform, dialog box manager", |
---|
50 | "author" : "Jerome Alet", |
---|
51 | "author_email" : "alet@librelogiciel.com", |
---|
52 | "url" : "http://www.librelogiciel.com/software/", |
---|
53 | "data_files" : [(directory, glob.glob(os.path.join("icons", "*.ico")))], |
---|
54 | } |
---|
55 | if withPy2EXE : |
---|
56 | setupDictionary["windows"] = [os.path.join("bin", "pykoticon")] |
---|
57 | setupDictionary["data_files"].append((directory, os.path.join("bin", "pykoticon.vbs"))) |
---|
58 | else : |
---|
59 | setupDictionary["scripts"] = [os.path.join("bin", "pykoticon")] |
---|
60 | |
---|
61 | setup(**setupDictionary) |
---|