Changeset 780:1687ac1948d0 in hatta-dev for setup.py


Ignore:
Timestamp:
07/16/10 20:18:33 (22 months ago)
Author:
Cezary Krzyżanowski <cezary.krzyzanowski@…>
Branch:
default
Message:

Moved ui and png to resources. Get the png packed. Make dialog find it's icon while debugging and when frozen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r765 r780  
    3434        ('share/locale/sv/LC_MESSAGES', ['locale/sv/LC_MESSAGES/hatta.mo']), 
    3535        ('share/icons/hicolor/scalable', ['resources/hatta.svg']), 
    36         ('share/icons/hicolor/64x64', ['resources/hatta.png']), 
     36        ('share/icons/hicolor/64x64', ['resources/hatta.png', 
     37            'resources/error.png']), 
    3738        ('share/applications', ['resources/hatta.desktop']), 
    3839        ('share/doc/hatta/examples', [ 
     
    4546    requires=['werkzeug (>=0.3)', 'mercurial (>=1.0)', 
    4647             'pybonjour (>=1.1.1)'], 
    47     setup_requires = ['pybonjour'], 
     48    setup_requires=['pybonjour'], 
    4849    classifiers=[ 
    4950        'License :: OSI Approved :: GNU General Public License (GPL)', 
     
    5859        'Environment :: Web Environment', 
    5960    ], 
    60     options = { 
     61    options={ 
    6162        'py2exe': { 
    62                         'includes': ['sip'], 
     63                        'includes': ['sip'], 
    6364            'packages': ['werkzeug', 'dbhash', 'encodings', 
    6465                         'Image', 'pygments'], 
    65             'excludes': ['_ssl', 'tcl', 'tkinter', 'Tkconstants'  
    66                          ,'Tkinter'], 
     66            'excludes': ['_ssl', 'tcl', 'tkinter', 'Tkconstants', 
     67                         'Tkinter'], 
    6768            'dll_excludes': ['tcl84.dll', 'tk84.dll'], 
    6869            "compressed": 1, 
    6970            "optimize": 2, 
    70                         "bundle_files": 1, 
     71                    "bundle_files": 1, 
    7172        }, 
    7273        'py2app': { 
     
    121122                    if 'debug' in file: 
    122123                        print 'removing', file 
    123                         os.remove(os.path.join(root,file)) 
     124                        os.remove(os.path.join(root, file)) 
    124125 
    125126            # And run macdeployqt to copy plugins and build a dmg 
     
    136137elif sys.platform == 'win32': 
    137138    ### Windows installer ### 
    138         # Hack to make py2exe import win32com 
    139         # http://www.py2exe.org/index.cgi/WinShell 
     139        # Hack to make py2exe import win32com 
     140        # http://www.py2exe.org/index.cgi/WinShell 
    140141    # ModuleFinder can't handle runtime changes to __path__, but win32com uses them 
    141142    import time 
     
    238239                from datetime import datetime 
    239240                version = version[:-3] + '.' + datetime.now().strftime('%Y%m%d%H%M') 
    240                  
     241 
    241242            # create the Installer, using the files py2exe has created. 
    242243            script = InnoScript("hatta", lib_dir, dist_dir, 
     
    251252            # Output subdirectory. 
    252253    # class BuildInstaller 
    253      
    254         config['zipfile'] = None 
     254 
     255        config['zipfile'] = None 
    255256    config['cmdclass'] = {"py2exe": BuildInstaller} 
    256257    config['windows'] = [{ 
    257                 'script': 'hatta_qticon.py', 
     258            'script': 'hatta_qticon.py', 
    258259        'icon_resources': [(1, "resources/hatta.ico")], 
    259260    }] 
    260      
     261 
    261262    # Adding MS runtime C libraries 
    262263    if sys.version.startswith('2.6'): 
     
    287288                return 0 
    288289            return origIsSystemDLL(pathname) 
    289         py2exe.build_exe.isSystemDLL = isSystemDLL     
     290        py2exe.build_exe.isSystemDLL = isSystemDLL 
    290291 
    291292else: # Other UNIX-like 
    292293    config['scripts'] = ['hatta_qticon.py', 'hatta_gtkicon.py'] 
    293294 
    294 if __name__=='__main__': 
     295if __name__ == '__main__': 
    295296    setup(**config) 
    296297    try: 
Note: See TracChangeset for help on using the changeset viewer.