#83: scipy namespace not detected correctly
---------------------------+------------------------------------------------
 Reporter:  peteburgers    |       Owner:  williamcaban
     Type:  defect         |      Status:  new         
 Priority:  normal         |   Milestone:              
Component:  Documentation  |     Version:              
 Severity:  blocker        |    Keywords:              
---------------------------+------------------------------------------------
 '''Background:'''

 In the scipy package, there are a few functions shifted around during
 package import.

 The following all get copied from scipy.misc.xxx to scipy.xxx:

 ['info','factorial','factorial2','factorialk','comb','who',
 'lena','central_diff_weights', 'derivative', 'pade', 'source']

 '''Reproducing:'''
 {{{
 import scipy.signal
 }}}
 (scipy.signal contains a call to "scipy.factorial")
 {{{
 Running scripts
 Traceback (most recent call last):
   File "<string>", line 28, in <module>
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 427, in
 importHook
     mod = _self_doimport(nm, ctx, fqname)
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 512, in
 doimport
     exec co in mod.__dict__
   File
 
"c:\linuxshare\tabla\tools\peak_power\src\build\pyi.win32\peak_power\outPYZ1.pyz/scipy.signal
 ", line 11, in <module>
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 427, in
 importHook
     mod = _self_doimport(nm, ctx, fqname)
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 512, in
 doimport
     exec co in mod.__dict__
   File
 
"c:\linuxshare\tabla\tools\peak_power\src\build\pyi.win32\peak_power\outPYZ1.pyz/scipy.signal
 .ltisys", line 9, in <module>
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 427, in
 importHook
     mod = _self_doimport(nm, ctx, fqname)
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 512, in
 doimport
     exec co in mod.__dict__
   File
 
"c:\linuxshare\tabla\tools\peak_power\src\build\pyi.win32\peak_power\outPYZ1.pyz/scipy.interp
 olate", line 15, in <module>
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 427, in
 importHook
     mod = _self_doimport(nm, ctx, fqname)
   File "c:\linuxshare\tabla\tools\pyinstaller\iu.py", line 512, in
 doimport
     exec co in mod.__dict__
   File
 
"c:\linuxshare\tabla\tools\peak_power\src\build\pyi.win32\peak_power\outPYZ1.pyz/scipy.interp
 olate.polyint", line 2, in <module>
 ImportError: cannot import name factorial
 }}}

 '''Workaround:'''
 {{{
 import scipy.misc
 import scipy
 scipy.factorial = scipy.misc.factorial
 import scipy.signal
 }}}

 '''Hiddenimport hook:'''

 I tried adding a hiddenimport hook, but this had no effect - perhaps I've
 missed something?

 hooks/hook-scipy.py:
 {{{
 hiddenimports =
 ['info','factorial','factorial2','factorialk','comb','who',
                   'lena','central_diff_weights', 'derivative', 'pade',
 'source']
 }}}

-- 
Ticket URL: <http://www.pyinstaller.org/ticket/83>
Pyinstaller <http://www.pyinstaller.org>
PyInstaller Project
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to