root / pykoticon / trunk / setup.py @ 140

Revision 140, 2.2 kB (checked in by jerome, 18 years ago)

Added manual page.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
RevLine 
[72]1#! /usr/bin/env python
2# -*- coding: ISO-8859-15 -*-
3
[118]4"""Packaging and installation script for PyKotIcon."""
5
[140]6# PyKotIcon - Client side helper for PyKota and other applications
[72]7#
[89]8# (c) 2003, 2004, 2005, 2006 Jerome Alet <alet@librelogiciel.com>
[72]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
27from distutils.core import setup
[73]28import sys
[72]29import os
[120]30import imp
[72]31import glob
[73]32try :
33    import py2exe
34except ImportError :
35    if sys.platform == "win32" :
36        sys.stderr.write("py2exe is not installed ! ABORTING.\n")
37        sys.exit(-1)
38    else :   
[76]39        directory = os.sep.join(["share", "pykoticon"])
[116]40        withPy2EXE = False
[73]41else :       
[76]42    directory = "."
[116]43    withPy2EXE = True
[72]44
[120]45config = imp.load_source("config", os.path.join("bin", "pykoticon"))
[116]46setupDictionary = { "name" : "pykoticon", 
[120]47                    "version" : config.__version__,
48                    "license" : config.__license__,
49                    "description" : config.__doc__,
50                    "author" : config.__author__,
51                    "author_email" : config.__author_email__,
52                    "url" : config.__url__,
[121]53                    "data_files" : [(directory,
54                                     glob.glob(os.path.join("icons", "*.ico")))],
[116]55                  }
[118]56if withPy2EXE :
[121]57    setupDictionary["windows"] = [ os.path.join("bin", "pykoticon") ]
58    setupDictionary["data_files"].append((directory, [os.path.join("bin", "pykoticon.vbs")]))
[118]59else :
[116]60    setupDictionary["scripts"] = [os.path.join("bin", "pykoticon")]
61setup(**setupDictionary)
Note: See TracBrowser for help on using the browser.