Opened 11 years ago

Last modified 8 years ago

#696 accepted enhancement

Version checking against MediaGoblin for plugins

Reported by: Christopher Allan Webber Owned by:
Priority: minor Milestone:
Component: programming Keywords: pluginapi
Cc: Parent Tickets:


It would be nice if plugins could verify that they're compatible with the running version of MediaGoblin before they're turned on.

Change History (4)

comment:1 by Christopher Allan Webber, 11 years ago

Status: newaccepted

comment:2 by Elrond, 11 years ago

One option is to use a generic requires.txt in the plugin's directory and let mediagoblin check that at load/install/unit-testing time.

Here's possible code to check this (see

def checkfeature(feature):
  everything_okay = True
  f = pkg_resources.resource_stream(feature, "requires.txt")
  with f:
    for r in pkg_resources.parse_requirements(f):
      if pkg_resources.working_set.find(r) is None:
        print "%r not found, please install, otherwise this feature does not work" % (r,)
        everything_okay = False
  return everything_okay

This is one option to resolve this ticket.

comment:3 by Christopher Allan Webber, 10 years ago

Seems like a good solution. I'd love to try this soonish... if someone wants to try to turn this into a real patch though, a branch would be most welcome :)

comment:4 by Loic Dachary, 8 years ago

Type: defectenhancement
Note: See TracTickets for help on using tickets.