Issue314

Title Package contents ignored if not imported in __init__.py
Priority bug Status deferred
Superseder Nosy List mattpepin
Assigned To Keywords

Created on 2016-07-14.18:50:31 by mattpepin, last changed by kayhayen.

Messages
msg1944 (view) Author: kayhayen Date: 2016-07-21.09:22:55
As a workaround, do manually import them somewhere in your main module, in an 
unused function. Nuitka won't optimize this away, but include stuff with --
recurse-all then.

Yours,
Kay
msg1943 (view) Author: kayhayen Date: 2016-07-21.09:21:50
The recursion options are not powerful enough yet to allow this, will be changed 
in the future.
msg1942 (view) Author: mattpepin Date: 2016-07-14.18:50:31
I have a package with many modules, but none of them are imported in __init__.py. 
Nuitka completely ignores them even if I force their recursion. Example:

test/a.py:
class TestA:
    pass

test/b.py:
class TestB:
    pass

test/__init__.py:
<empty>

Typical usage:
from test.a import TestA

The resulting test.so will not contain test.a, nor test.b if they're not 
referenced in __init__.py, even if the module is compiled like so (probably to 
much resurse options but it still doesn't work):

nuitka --module test --recurse-to=test --recurse-directory=test --recurse-
files=test/a.py --recurse-files=test/b.py --recurse-to=test.a

Thanks!
History
Date User Action Args
2016-07-21 09:22:55kayhayensetmessages: + msg1944
2016-07-21 09:21:50kayhayensetstatus: unread -> deferred
messages: + msg1943
2016-07-14 18:50:31mattpepincreate