Source

JYUQuota / setup.py

Full commit
# -*- coding: utf-8 -*-
'''
Created on Mar 27, 2010

@author: epeli
'''

import os
from glob import glob
from distutils.core import setup


ico_path = "jyuquota/data/logo.ico"
package_name = 'jyuquota'

f = open(os.path.join(package_name, 'data/version.txt'), 'r')
version = f.read().strip()
f.close()

try:
    import py2exe
    py2exe_setup = dict(
          scripts=['scripts/jyuquotatray',],
          zipfile = "lib/library.zip",
          windows=[{
                    "script": 'jyuquotatray.pyw',
                    "icon_resources": [(1, ico_path)]    
                    }],
					
          data_files=[('data', glob(r"jyuquota/data/*")),
					 ("Microsoft.VC90.CRT", glob(r'windows_installer_files/Microsoft.VC90.CRT/*'))],
                       
          options={"py2exe": {"skip_archive": True, "includes": ["sip"]}}
        )
    
except ImportError:
    py2exe_setup = dict()


setup(
      name='JYUQuotaTray',
      version=version,
      description='''Residential Network Quota Monitor for network connections 
offered by University of Jyvaskyla (KOAS, Student village and Vehkakuja). ''',
      author='Esa-Matti Suuronen',
      author_email='esa-matti@suuronen.org',
      url='http://bitbucket.org/epeli/jyuquota/',
      license='GNU General Public License (GPL)',
      packages=[package_name],
      package_data={package_name: ['data/*']},

      **py2exe_setup  
      
)