Estimados, tengo un problema, quiero convertir la app creada en Web2Py en una app .exe, pero cuando ejecuto cx-freeze me dice este error:
Traceback (most recent call last):
File "setup.py", line 10, in <module>
from cx_Freeze import setup, Executable
File "C:\Python27\lib\site-packages\cx_Freeze\__init__.py", line 11, in <modul
e>
from cx_Freeze.freezer import *
File "C:\Python27\lib\site-packages\cx_Freeze\freezer.py", line 13, in <module
>
import socket
File "C:\Python27\lib\socket.py", line 47, in <module>
import _socket
ImportError: DLL load failed: No se encontr¾ el proceso especificado.
Creo que es por que estoy tratando de compilar a otro .exe, que es Web2Py, ahora paso el script setup.py:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
Install cx_Freeze: http://cx-freeze.sourceforge.net/
Copy script to the web2py directory
c:\Python27\python standalone_exe_cxfreeze.py build_exe
"""
from cx_Freeze import setup, Executable
from gluon.import_all import base_modules, contributed_modules
from gluon.fileutils import readlines_file
from glob import glob
import fnmatch
import os
import shutil
import sys
import re
#read web2py version from VERSION file
web2py_version_line = readlines_file('VERSION')[0]
#use regular expression to get just the version number
v_re = re.compile('[0-9]+\.[0-9]+\.[0-9]+')
web2py_version = v_re.search(web2py_version_line).group(0)
base = None
if sys.platform == 'win32':
base = "Win32GUI"
base_modules.remove('macpath')
buildOptions = dict(
compressed=True,
excludes=["macpath", "PyQt4"],
includes=base_modules,
include_files=[
'applications',
'ABOUT',
'LICENSE',
'VERSION',
'logging.example.conf',
'options_std.py',
'app.example.yaml',
'queue.example.yaml',
],
# append any extra module by extending the list below -
# "contributed_modules+["lxml"]"
packages=contributed_modules,
)
setup(
name="Web2py",
version=web2py_version,
author="Massimo DiPierro",
description="web2py web framework",
license="LGPL v3",
options=dict(build_exe=buildOptions),
executables=[Executable("web2py.py",
base=base,
compress=True,
icon="web2py.ico",
targetName="web2py.exe",
copyDependentFiles=True)],
)
No me doy cuenta si existe alguna forma de compilar a binario o convertir en .exe la app creada con web2py.