Embedded packages that have to be embedded for the module to work in Windows.

This commit is contained in:
Jeremy Wright 2014-12-01 14:34:07 -05:00
parent f47788f6e7
commit 010377c5cd
3 changed files with 10 additions and 3 deletions

View File

@ -22,7 +22,8 @@ class CadQueryWorkbench (Workbench):
os.environ['QT_API'] = 'pyside'
#Turn off logging for now
#import logging
import logging
logging.basicConfig(filename='C:\\Users\\Jeremy\\Documents\\', level=logging.DEBUG)
#logging.basicConfig(filename='/home/jwright/Documents/log.txt', level=logging.DEBUG)
#We have our own CQ menu that's added when the user chooses our workbench
@ -92,6 +93,11 @@ class CadQueryWorkbench (Workbench):
#Set up the text area for our CQ code
server_path = os.path.join(module_base_path, 'cq_server.py')
# if sys.platform.startswith('win'):
# #We have to jump through extra hoops to hand-hold Windows here
# server_path = "\"" + server_path + "\""
# libs_path = "\"" + libs_path + "\""
# FreeCAD.Console.PrintMessage( server_path + ":" + libs_path)
codePane = PyCodeEdit(server_script=server_path, interpreter=interpreter, args=['-s', libs_path])
codePane.setObjectName("cqCodePane")

Binary file not shown.

View File

@ -12,10 +12,11 @@ ZIP = os.path.join(os.getcwd(), 'libs.zip')
if len(sys.argv) == 2 and sys.argv[1] == 'gen':
#--- gen zip file
import jedi, pep8, pyqode, pyqode.core, pyqode.python, pyqode.qt, qidle, frosted, pies, cadquery
import jedi, pep8, pyqode, pyqode.core, pyqode.python, pyqode.qt, pygments, frosted, pies, builtins, future, \
docutils, cadquery
from qidle.system import embed_package_into_zip
embed_package_into_zip([jedi, pep8, pyqode, pyqode.core, pyqode.python,
pyqode.qt, cadquery, frosted, pies], ZIP)
pyqode.qt, pygments, frosted, pies, builtins, future, docutils, cadquery], ZIP)
else:
# remove all pyqode path from sys.path (to make sure the package are
# imported from the zip archive)