jbanderson / django-cherrypy-pyinstaller-standalone Goto Github PK
View Code? Open in Web Editor NEWAn example application that demonstrates a Django/CherryPy app frozen into an executable using PyInstaller.
License: MIT License
An example application that demonstrates a Django/CherryPy app frozen into an executable using PyInstaller.
License: MIT License
I'm doing the same thing packaging a django app with pyinstaller but I couldn't figure out how to use CherryPy. This is perfect.
Although when I try to package either of the apps with pysintaller I get the TypeError. I was running into similar issues when I was packaging my own app and upgrading pyinstaller to the development version fixed the issue. I've attempted the same here without any luck.
I'm running Python 2.7 on Windows 8 with the following packages installed in a virtualenv:
CherryPy==3.2.3
Django==1.6.5
PyInstaller==2.1
beautifulsoup4==4.3.2
pywin32==219
Here is the full error output. Have you seen this before or is it truly an issue?
(cherrypy)PS Z:\01. Python Development\Django-CherryPy-PyInstaller-Standalone\Standalone_win_single_file\source> pyinsta
ller -F serve.spec
37 INFO: Testing for ability to set icons, version resources...
72 INFO: ... resource update available
73 INFO: UPX is not available.
95 INFO: Processing hook hook-os
220 INFO: Processing hook hook-time
223 INFO: Processing hook hook-cPickle
296 INFO: Processing hook hook-_sre
411 INFO: Processing hook hook-cStringIO
513 INFO: Processing hook hook-encodings
527 INFO: Processing hook hook-codecs
898 INFO: Extending PYTHONPATH with Z:\01. Python Development\Django-CherryPy-PyInstaller-Standalone\Standalone_win_sing
le_file
898 INFO: checking Analysis
898 INFO: building Analysis because out00-Analysis.toc non existent
900 INFO: running Analysis out00-Analysis.toc
901 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
1025 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
1026 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6a
c711f91.manifest
1027 INFO: Searching for file msvcr90.dll
1027 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcr9
0.dll
1029 INFO: Searching for file msvcp90.dll
1029 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcp9
0.dll
1029 INFO: Searching for file msvcm90.dll
1029 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcm9
0.dll
1155 INFO: Analyzing C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\loader\_pyi_bootstrap.py
1167 INFO: Processing hook hook-os
1187 INFO: Processing hook hook-site
1206 INFO: Processing hook hook-encodings
1319 INFO: Processing hook hook-time
1322 INFO: Processing hook hook-cPickle
1394 INFO: Processing hook hook-_sre
1512 INFO: Processing hook hook-cStringIO
1624 INFO: Processing hook hook-codecs
2026 INFO: Processing hook hook-pydoc
2148 INFO: Processing hook hook-email
2207 INFO: Processing hook hook-httplib
2243 INFO: Processing hook hook-email.message
2300 INFO: Analyzing C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\loader\pyi_importers.py
2348 INFO: Analyzing C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\loader\pyi_archive.py
2392 INFO: Analyzing C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\loader\pyi_carchive.py
2438 INFO: Analyzing C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\loader\pyi_os_path.py
2447 INFO: Analyzing serve.py
serve.py:110: SyntaxWarning: import * only allowed at module level
def start(self):
2456 INFO: Django root directory Z:\01. Python Development\Django-CherryPy-PyInstaller-Standalone\Standalone_win_single_
file\source\tango_project
Traceback (most recent call last):
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\hooks\utils\django-import-finder.py", line 23,
in <module>
list(settings.TEMPLATE_LOADERS) +
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\django\conf\__init__.py", line 54, in __getattr__
self._setup(name)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\django\conf\__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\django\conf\__init__.py", line 132, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'tango_project.settings' (Is it on sys.path? Is there an import error in the sett
ings file?): No module named tango_project.settings
Traceback (most recent call last):
File "C:\Users\Alex\.virtualenvs\cherrypy\Scripts\pyinstaller-script.py", line 9, in <module>
load_entry_point('PyInstaller==2.1', 'console_scripts', 'pyinstaller')()
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\main.py", line 88, in run
run_build(opts, spec_file, pyi_config)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\main.py", line 46, in run_build
PyInstaller.build.main(pyi_config, spec_file, **opts.__dict__)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\build.py", line 1924, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\build.py", line 1873, in build
execfile(spec)
File "serve.spec", line 6, in <module>
runtime_hooks=None)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\build.py", line 446, in __init__
self.__postinit__()
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\build.py", line 309, in __postinit__
self.assemble()
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\build.py", line 599, in assemble
importTracker.analyze_script(script)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\depend\imptracker.py", line 273, in analyze_sc
ript
return self.analyze_r('__main__')
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\depend\imptracker.py", line 166, in analyze_r
newnms = self.analyze_one(name, nm, imptyp, level)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\depend\imptracker.py", line 227, in analyze_on
e
mod = self.doimport(nm, ctx, fqname)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\depend\imptracker.py", line 325, in doimport
hook = imp.load_module('PyInstaller.hooks.' + hookmodnm, *m)
File "C:\Users\Alex\.virtualenvs\cherrypy\lib\site-packages\PyInstaller\hooks\hook-django.py", line 35, in <module>
package_name + '.wsgi',
TypeError: cannot concatenate 'str' and 'list' objects
(cherrypy)PS Z:\01. Python Development\Django-CherryPy-PyInstaller-Standalone\Standalone_win_single_file\source>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.