plugins icon indicating copy to clipboard operation
plugins copied to clipboard

Plugin dependencies

Open Kwpolska opened this issue 12 years ago • 8 comments

  • [ ] Find a sane way to implement it (a third file does not make much sense)
  • [ ] Make it nicely visible in the web app
  • [ ] Have the install_plugin option install the plugins
  • [ ] Make sure we do not break much by implementing it

Kwpolska avatar Oct 11 '13 13:10 Kwpolska

You mean plugins depending on other plugins? I think a metadata field in the .plugin file is enough

ralsina avatar Oct 11 '13 13:10 ralsina

How would that work?

We could:

  1. Requirements = a,b,c (ignoring spaces)

  2. Requirements = a;b;c (ignoring spaces)

  3. Requirements = [a,b,c] (ignoring spaces)

  4. (wouldn’t configparser shit itself?)

    [Nikola]
    Requirement = a
    Requirement = b
    Requirement = c
    
    [Requirements]
    Requirement = a
    Requirement = b
    Requirement = c
    

    6. (what about more specific ranges? Or should we ignore the value altogether?)

    [Requirements]
    a = 0.1.0
    b = 0.2.0
    c = 0.5.0
    

Or maybe, in requirements.txt:

nikola.plugins.a
nikola.plugins.b
nikola.plugins.c

Kwpolska avatar Oct 11 '13 13:10 Kwpolska

Assuming the dependency names are just strings, we can always use "['foo','bar']" which can be created using json.dumps but it should not be necessary, I like your version 6

ralsina avatar Oct 11 '13 13:10 ralsina

Yep, I think version 6 is more clean...

damianavila avatar Oct 11 '13 15:10 damianavila

So, let’s actually trim out all of that nonsense and leave in two.

  1. *.plugin
[Requirements]
a = 0.1.0
b = 0.2.0
c = 0.5.0
  • Advantages:
    • separated from python requirements
  • Disadvantages:
    • it’s hard to create a format that would encompass all version requirements
    • we (plugins.getnikola.com) provide only one version of a plugin anyways, making versions here a waste of time and space
    • and we do not have anything else to put after the = sign, something we have to do
  1. requirements.txt
nikola.plugins.a
nikola.plugins.b
  • Advantages:
    • unambiguous
    • plugins are python but are not in the pypi — we can filter the file for installation with pip
    • if we ever implement multiple versions, it can be added in the usual syntax at any given moment
  • Disadvantages:
    • mixed with python requirements

Kwpolska avatar Oct 11 '13 16:10 Kwpolska

any thoughts, ideas, or such?

Kwpolska avatar Oct 11 '13 17:10 Kwpolska

I'm ok with both

ralsina avatar Oct 11 '13 17:10 ralsina

Re-thinking, I am more inclined to the second one version...

damianavila avatar Oct 11 '13 17:10 damianavila