Opened 7 years ago

Closed 6 years ago

#1147 closed defect (fixed)

make failing when bundle has a pip dependency

Reported by: Tristan Croll Owned by: Conrad Huang
Priority: blocker Milestone:
Component: Tool Shed Version: 0.7
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

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@…](mailto:chimerax-bugs@…) 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.

Change History (3)

comment:1 by Conrad Huang, 7 years ago

Status: assignedfeedback

The bundle_builder code has been updated to work with newer versions of pip/setuptools/wheel and uses pkg_resources instead of private pip classes. I tested non-ChimeraX bundles by adding a dependency to "tbgrep" and it worked fine. Can you please check if this is still a problem?

comment:2 by Conrad Huang, 7 years ago

When building a bundle and getting the list of include and library directories for dependencies, non-bundle dependencies now returns None's instead of raising an exception. 96789ad87

comment:3 by Conrad Huang, 6 years ago

Resolution: fixed
Status: feedbackclosed

I think this ticket was fixed but never closed.

Note: See TracTickets for help on using tickets.