I'm trying to figure out the best way to handle an optional GPL
dependency.  We may have other non-AL2 licensed deps that we can work
through later, but my current task involves importing from mediawiki to
Allura and the GPL lib from
https://github.com/zikzakmedia/python-mediawiki seems like the best way
to do it.  This isn't core functionality to Allura, so according to
http://www.apache.org/legal/resolved.html#optional it should be ok for
the importer code to depend on it.

So, on to technical matters - how to make that work.   So far I'm
ensuring that "import mediawiki" is in the importer code, so everything
else functions without it installed.  Trickier bits are:

1) How to run the importer tests.  I'm thinking they should
automatically skip if the mediawiki package is not present.  An
alternative would be to move them to some location so that they are not
run by default, and would have to be manually run.

2) Where to define the dependency.  Currently all deps are listed in
requirements-common.txt which is used during regular installation.  It
should not be there since it'll be optional.  We could have a
requirements-optional.txt and put all optional deps there.  But that
could grow to be a hodge-podge and only useful if someone wants
absolutely everything (e.g. during a test suite run).  I think also the
importer script should give specific installation instruction if it is
attempted to be run.

How does that sound?  I expect this won't be the only time we have to
deal with it, so a pattern would be good to establish.




-- 
Dave Brondsema : [email protected]
http://www.brondsema.net : personal
http://www.splike.com : programming
              <><

Reply via email to