Advertisement
here2share

# help4py2exe.py -- work in progress

Oct 7th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.89 KB | None | 0 0
  1. # help4py2exe.py -- work in progress
  2.  
  3. '''
  4. If MSVCP90.dll is missing... install the Microsoft Visual C++ 2008 Redistributable Package
  5. '''
  6.  
  7. from distutils.core import setup
  8. import FileDialog
  9. import sys, os
  10. sys.path.append("C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC90.CRT")
  11. sys.argv.append('py2exe')
  12. import py2exe
  13.  
  14. #includes = ['numpy', 'scipy']
  15.  
  16. __showConsole=0
  17. __MSVCP90=1
  18. __Tkinter=1
  19. __PIL=1
  20.  
  21.  
  22.  
  23. setup(
  24.     options={
  25.         'py2exe'            :   {
  26.             'bundle_files'      :   1,
  27.             'compressed'        :   True,
  28.             'unbuffered'        :   False,
  29.             'dll_excludes'      :   [
  30.                 ('','MSVCP90.dll')[__MSVCP90],
  31.                 ],
  32.             'includes'          :   [
  33.                 ('','Tkinter')[__Tkinter],
  34.                 ('','PIL')[__PIL],
  35.                 'Tkconstants',
  36.                 'struct',
  37.                 ],
  38.             'optimize'          :   2,
  39.             'dist_dir'          :   'foo',
  40.             'dll_excludes'      :   [
  41.                 'tcl85.dll',
  42.                 'tk85.dll',
  43.                 ],
  44.             'packages'          :   [
  45.                 'FileDialog',
  46.                 'dateutil',
  47.                 ],
  48.             },
  49.         },
  50.     windows=[{
  51.         'script'            :   'hello_world.'+('.pyw','.pyc')[__showConsole],
  52.         'icon_resources'    :   [(1, 'hello_world.ico')],
  53.         }],
  54.     zipfile=None,
  55.     name='hello world',
  56.     version='2000.12 version',
  57.     url='https://github(.)com/author/hello_world',
  58.     license='MIT',
  59.     author='firstname lastname',
  60.     author_email='author@gmail(.)com',
  61.     description='Prints "Hello World".',
  62.     keywords=['gui', 'executable'],
  63.     classifiers=[
  64.         'License :: OSI Approved :: MIT License',
  65.         'Programming Language :: Python',
  66.         'Programming Language :: Python :: 2',
  67.         'Programming Language :: Python :: 2.7',
  68.         'Programming Language :: Python :: 3',
  69.         'Programming Language :: Python :: 3.3',
  70.         'Programming Language :: Python :: 3.4',
  71.         'Programming Language :: Python :: 3.5',
  72.         'Programming Language :: Python :: 3.6',
  73.         'Programming Language :: Python :: 3.7',
  74.         'Operating System :: Microsoft :: Windows',
  75.         'Operating System :: POSIX :: Linux',
  76.     ]
  77. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement