close Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 19 months ago

Last modified 8 months ago

#615 assigned defect

problems finding module zope

Reported by: jerobarraco Owned by: htgoebel
Priority: high Milestone: PyInstaller 3.0
Component: PyInstaller Version: 2.0
Severity: major Keywords:
Cc:

Description (last modified by htgoebel)

my app depends on ZODB, and uses ZEO, that in turns depends on zope.event and zope.interface, which are two different eggs but use the same namespace.

site-packages /
    zope.event.xxxx.egg/
       zope/
          __init__.py
          event/
            __init__.py
    zope.interface.xxxx.egg/
       zope/
          __init__.py
          interface/
            __init__.py

the zope.event.xxx.egg/zope/init.py file contains :

__import__('pkg_resources').declare_namespace(__name__)

and zope.interface.xxx.egg/zope/init.py contains:

# this is a namespace package
try:
    import pkg_resources
    pkg_resources.declare_namespace(__name__)
except ImportError:
    import pkgutil
    __path__ = pkgutil.extend_path(__path__, __name__)

i tried to write a hook, but it can't pick "hook-zope.event.py"
i tried using hiddenimports and even tried to set the pathex
obviously the app works correctly when using from source. but when i try to package it (with pyinstaller) it says it can't find zope.event.
"matysek_" from irc recommended me to try modulegraph and file a report.
here's what i've done :

>>> from modulegraph.find_modules import find_modules as fm
>>> mg = fm(['banta/__init__.py'])
>>> f = open('o.txt', 'w')
>>> for i in mg.flatten(): f.write(str(i))
...
>>> f.close()

and it finds it

Attachments (0)

Change History (8)

comment:1 Changed 19 months ago by matysek

  • Milestone set to PyInstaller 2.1
  • Priority changed from normal to high

We could try to use modulegraph library for finding dependent modules.

comment:2 Changed 19 months ago by matysek

Example output of found dependencies by modulegraph: http://puu.sh/1b1dP

comment:3 Changed 13 months ago by matysek

  • Milestone changed from PyInstaller 2.1 to PyInstaller 2.2

comment:4 Changed 8 months ago by glyph@…

This is apparently making it so that people can't use Twisted with pyinstaller. Is there any known workaround?

comment:5 Changed 8 months ago by htgoebel

  • Description modified (diff)

comment:6 Changed 8 months ago by htgoebel

  • Component changed from Hooks to PyInstaller
  • Milestone changed from PyInstaller 3.0 to PyInstaller 2.1
  • Severity changed from normal to major
  • Status changed from new to assigned

comment:7 Changed 8 months ago by htgoebel

Also see #502:

comment:8 Changed 8 months ago by htgoebel

  • Milestone changed from PyInstaller 2.1 to PyInstaller 3.0

Pushing to milestone PyInstaller? 3.0 again. Implementing this is complex. Since modulegraph says to support it, wait solving issue #439 should give it for free.

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.