Issue318

Title openpyxl breaks standalone build
Priority bug Status chatting
Superseder Nosy List oyster
Assigned To oyster Keywords standalone

Created on 2016-08-31.12:30:43 by oyster, last changed by kayhayen.

Messages
msg1963 (view) Author: kayhayen Date: 2016-09-01.08:05:33
Hello,

yes, there is a place for this. They way you can do this, is to compile with --
python-flag=-v, then run, and see what module attempted the import (likely the 
last one being imported), and failed, then add this to popular modules implicit 
imports (there is PyQt stuff and lxml, and others already) and then send it my 
way, and Nuitka will do it out of the box for everybody...

Thanks,
Kay
msg1958 (view) Author: oyster Date: 2016-08-31.12:30:43
I am using Python 2.7.12 |Anaconda 2.2.0 (32-bit), and try to build the simple
program (yes, there is actually no action code except for import)
[test_openpyxl.py]
from openpyxl import load_workbook
from openpyxl.styles import Alignment
from openpyxl.styles.borders import Border, Side
from openpyxl.styles import Style, Font
[/test_openpyxl.py]

"nuitka --recurse-all --standalone --portable test_openpyxl.py" yields
test_openpyxl.exe.

[quote]
set PATH=NULL
test_openpyxl.exe
[/quote]
outputs
[quote]
ImportError: No module named _elementtree
[/quote]
so I add "import _elementtree" in my test_openpyxl.py by inspiration of
http://bugs.nuitka.net/issue281, this time
[quote]
ImportError: PyCapsule_Import could not import module "pyexpat"
[/quote]

I test and try, until my code can run. The code becomes
[test_openpyxl.py]
import _elementtree
import pyexpat
import _socket

from openpyxl import load_workbook
from openpyxl.styles import Alignment
from openpyxl.styles.borders import Border, Side
from openpyxl.styles import Style, Font
[/test_openpyxl.py]

This is some tedious and wastes a lot of time for every build

So my question is "is it possible to let nuitka copy all needed pyd
automatically?" Thanks

ps. http://packages.python.org/openpyxl/
History
Date User Action Args
2016-09-01 08:05:53kayhayensetkeyword: + standalone
2016-09-01 08:05:33kayhayensetstatus: unread -> chatting
assignedto: oyster
messages: + msg1963
2016-08-31 12:30:43oystercreate