i've got following application tree
app ├── app.data │ ├── app │ │ ├── data │ │ │ ├── __init__.py │ │ │ ├── module1.py │ │ │ ├── license.txt │ │ │ ├── readme.rst │ │ ├── __init__.py │ ├── license.txt │ ├── readme.rst │ ├── requirements.txt │ └── setup.py ├── app.gui │ ├── app │ │ ├── gui │ │ │ ├── __init__.py │ │ │ ├── module2.py │ │ │ ├── license.txt │ │ │ ├── readme.rst │ │ ├── __init__.py │ ├── license.txt │ ├── readme.rst │ ├── requirements.txt │ └── setup.py ├── app.processing │ ├── app │ │ ├── processing │ │ │ ├── __init__.py │ │ │ ├── module3.py │ │ │ ├── license.txt │ │ │ ├── readme.rst │ │ ├── __init__.py │ ├── license.txt │ ├── readme.rst │ ├── requirements.txt │ └── setup.py
i want freeze application cx_freeze. here setup.py:
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os cx_freeze import setup, executable # path modules sys.path.append(os.path.abspath('app.data')) sys.path.append(os.path.abspath('app.processing')) sys.path.append(os.path.abspath('app.gui')) path = sys.path import app.data # ok import app.processing # ok import istat.gui # ok # include/exclude modules option includes = [] excludes = ['urllib'] # packages packages = ['app.data', 'app.processing', 'istat.gui'] # non-py files includefiles = [] options = { 'build_exe': { 'includes': includes, 'excludes': excludes, 'path': path, 'packages': packages } } executables = [ executable('app.gui/module2.py', base=none) ] setup(name='app', version='1.0.0', description='description of app', options=options, executables=executables)
so import inside setup.py going well, cxfreeze give me error importerror: no module named 'app.procesing'
. dont understand why happens path module added sys.path
, imported test in setup.py
.
what doing wrong ?