[Biopython-dev] [Bug 2511] New: setup.py problem with del sys.modules["Martel"]

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Jun 9 08:45:24 EDT 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2511

           Summary: setup.py problem with del sys.modules["Martel"]
           Product: Biopython
           Version: Not Applicable
          Platform: PC
        OS/Version: Mac OS
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: biopython-bugzilla at maubp.freeserve.co.uk


I'm currently trying to install Biopython from source (CVS) on a clean Mac OS X
machine, without reportlab, Numeric or mxTextTools.  I've run into a small
issue with "python setup.py build" related to the testing for an existing
Martel distribution (since Martel has been distributed separately from
Biopython before) due to the lack of mxTextTools.

Traceback (most recent call last):
  File "setup.py", line 508, in <module>
    'Bio.PopGen': ['SimCoal/data/*.par'],
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py",
line 151, in setup
    dist.run_commands()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 974, in run_commands
    self.run_command(cmd)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 994, in run_command
    cmd_obj.run()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build.py",
line 112, in run
    self.run_command(cmd_name)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/cmd.py",
line 333, in run_command
    self.distribution.run_command(command)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 994, in run_command
    cmd_obj.run()
  File "setup.py", line 157, in run
    if not is_Martel_installed():
  File "setup.py", line 292, in is_Martel_installed
    del sys.modules["Martel"]   # Delete the old version of Martel.

The function  is_Martel_installed() starts by trying to load the bundled
Martel, by calling can_import("Martel").  This is failing with an ImportError
from mxTextTools - and hence the Martel version of the bundled copy cannot be
determined.  The next line of  is_Martel_installed() causes the problem:

del sys.modules["Martel"]

I think this only makes sense if the module could be imported, patch to follow.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list