﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1147	make failing when bundle has a pip dependency	Tristan Croll	Conrad Huang	"Finally getting around to updating to version 0.7, and building the Clipper plugin is failing (traceback below). I've installed the Clipper-Python dependency using `ChimeraX -m pip install clipper-python`, so that's not the issue. Looking at the offending line in `bundle_builder.py`, it looks like it will currently fail for any bundle that has an explicit non-ToolShed dependency. I *think* what it should be is this (at least, it gets me past the road-block):

{{{
    def _get_bundle_dirs(self, logger, dep):
        from chimerax.core import toolshed
        # It's either pulling unsupported class from pip or roll our own.
        from pip.req.req_install import InstallRequirement
        ir = InstallRequirement.from_line(dep)
        if not ir.check_if_exists():
            raise RuntimeError(""unsatisfied dependency: %s"" % dep)
        ts = toolshed.get_toolshed()
        bundle = ts.find_bundle(ir.name, logger)
        # if not bundle:
        #     raise RuntimeError(""bundle not found: %s"" % ir.name)
        inc = None
        lib = None
        if bundle:
            inc = bundle.include_dir()
            lib = bundle.library_dir()
        return inc, lib
}}} 


Traceback (most recent call last):  
  File ""/home/tic20/apps/chimerax/lib/python3.6/runpy.py"", line 193, in
_run_module_as_main  
    ""__main__"", mod_spec)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/runpy.py"", line 85, in
_run_code  
    exec(code, run_globals)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/ChimeraX_main.py"", line 792, in <module>  
    exit_code = init(sys.argv)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/ChimeraX_main.py"", line 589, in init  
    run(sess, cmd)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/core/commands/run.py"", line 31, in run  
    results = command.run(text, log=log)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/core/commands/cli.py"", line 2650, in run  
    result = ci.function(session, **kw_args)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/core/commands/devel.py"", line 136, in devel_clean  
    _run(path, session.logger, exit, BundleBuilder.make_clean)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/core/commands/devel.py"", line 146, in _run  
    bb = _get_builder(path, logger)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/core/commands/devel.py"", line 190, in _get_builder  
    bb = BundleBuilder(logger, bundle_path=path)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 34, in __init__  
    self._make_setup_arguments()  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 280, in
_make_setup_arguments  
    for cm in self.c_modules]  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 280, in <listcomp>  
    for cm in self.c_modules]  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 517, in ext_mod  
    libraries, cpp_flags) = self._compile_options(logger, dependencies)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 482, in
_compile_options  
    d_inc, d_lib = self._get_bundle_dirs(logger, dep)  
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 500, in
_get_bundle_dirs  
    raise RuntimeError(""bundle not found: %s"" % ir.name)  
RuntimeError: bundle not found: Clipper-Python  
  

RuntimeError: bundle not found: Clipper-Python  
  
File ""/home/tic20/apps/chimerax/lib/python3.6/site-
packages/chimerax/bundle_builder/bundle_builder.py"", line 500, in
_get_bundle_dirs  
raise RuntimeError(""bundle not found: %s"" % ir.name)  
  
 _See log for complete Python traceback._  
  
If you wish to report this error, send mail to [chimerax-
bugs@cgl.ucsf.edu](mailto:chimerax-bugs@cgl.ucsf.edu) and describe what you
were doing and include a copy of the contents of the log. Don't include any
data you wish to remain private since a publicly viewable bug report will be
created.  
"	defect	closed	blocker		Tool Shed	0.7	fixed						all	ChimeraX
