Guest User

Untitled

a guest
Mar 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. setup.py
  2. mypkg/
  3. __init__.py
  4. gui_app.py
  5. icons/
  6. add.png
  7. import.png
  8. config/
  9. mycfg.json
  10. tests
  11. __init__.py
  12. tests.py
  13. ...
  14.  
  15. from setuptools import setup, find_packages
  16. from codecs import open
  17. from cx_Freeze import setup, Executable
  18. import sys
  19.  
  20. ...
  21.  
  22. setup(
  23. ...
  24. packages=find_packages(exclude=('tests', 'docs')),
  25. executables=[Executable("./mypkg/gui_app.py", base=base)],
  26. data_files=[('icons', ["./icons/add.png", "./icons/import.png"]),
  27. ('config', ["./config/mycfg.json"])],
  28. ...
  29. )
  30.  
  31. setup(
  32. ...
  33. executables=[Executable("./mypkg/gui_app.py", base=base)],
  34. options={
  35. 'build_exe': {
  36. 'packages': find_packages(exclude=('tests', 'docs')),
  37. 'include_files': ['icons', 'config'],
  38. }
  39. }
  40. )
  41.  
  42. setup(
  43. ...
  44. options={'build_exe': {'include_files': ['icons', 'config']}},
  45. )
  46.  
  47. options={'build_exe': {'include_files': [('icons', 'ico'), 'config']}}
  48.  
  49. options={'build_exe': {'include_files': [('config/mycfg.json', 'config/othercfg.json')]}}
  50.  
  51. find_packages(exclude=['tests.*'])
  52.  
  53. 'packages': find_packages(exclude=['tests.*'])
Add Comment
Please, Sign In to add comment