Install an add-on (collective.multitheme)

I think that documentation assumes that somewhere in the [instance] part there is something like

[instance]
eggs +=
    ...
    ${buildout:eggs}
    ...

which does not seems to be the case (see the "unused option for buildout eggs" message).

@thiebovic can you paste here the original buildout.cfg that you had when you first installed Plone?

The only thing that would be needed is to add a line collective.multitheme (indented by, usually, four spaces) to the part of the file that specifies the eggs

# NOTE: This file should be copied into the buildout root directory. It
# should never be checked in to version control so that the environment
# stays the same over time.
# 
#     $ cd path/to/your-buildout
#     $ cp profiles/buildout.cfg_tmpl buildout.cfg

[buildout]
index = https://pypi.python.org/simple/
# Once copied to the root, select the environment you are releasing to
# by uncommenting the appropriate line below.
extends =
#    profiles/local.cfg
    profiles/testing.cfg
#    profiles/prod.cfg
#    profiles/staging.cfg

This was the original buildout of my installation...

Here's a simple.cfg that works (just tested it).

[buildout]
#index = https://pypi.org/simple
extends = http://dist.plone.org/release/5.0.8/versions.cfg
show-picked-versions = true

parts =
    instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
    Plone
    Pillow
    collective.multitheme

[versions]
# Don't use a released version of collective.multitheme
collective.multitheme =

PyYAML = 3.12
argh = 0.26.2
args = 0.1.0
check-manifest = 0.35
clint = 0.5.1
colorama = 0.3.7
configparser = 3.5.0
coverage = 3.7.1
createcoverage = 1.5
enum34 = 1.1.6
flake8 = 3.3.0
flake8-blind-except = 0.1.1
flake8-coding = 1.3.0
flake8-debugger = 1.4.0
flake8-deprecated = 1.1
flake8-isort = 2.1.3
flake8-pep3101 = 1.0
flake8-plone-api = 1.2
flake8-plone-hasattr = 0.1
flake8-polyfill = 1.0.1
flake8-print = 2.0.2
flake8-quotes = 0.9.0
flake8-string-format = 0.2.3
flake8-todo = 0.7
i18ndude = 4.0.1
isort = 4.2.5
mccabe = 0.6.1
pathtools = 0.1.2
pkginfo = 1.4.1
plone.recipe.codeanalysis = 2.2
plone.testing = 5.0.0
pycodestyle = 2.3.1
pyflakes = 1.5.0
requests-toolbelt = 0.7.1
robotframework = 3.0
robotframework-ride = 1.5.2.1
robotframework-selenium2library = 1.7.4
robotsuite = 1.7.0
selenium = 2.53.6
setuptools = 24.3.0
testfixtures = 4.13.4
twine = 1.8.1
watchdog = 0.8.3
z3c.jbot = 0.7.2
zc.buildout = 2.5.3
zc.recipe.egg = 2.0.3
zest.releaser = 6.15.0
plone.tiles = 2.0.0b3
plone.subrequest = 1.8.1
plone.app.tiles = 3.0.3
plone.app.standardtiles = 2.2.0
plone.app.blocks = 4.1.1
plone.app.drafts = 1.1.2
plone.app.mosaic = 2.0rc8
plone.formwidget.multifile = 2.0
plone.jsonserializer = 0.9.5

medialog.iconpicker = 0.6.3.2
plone.app.jquery = 1.11.2
plone.recipe.command = 1.1

# Required by:
# medialog.iconpicker==0.6.3.2
collective.js.bootstrap = 3.3.6

# Required by:
# lineage.registry==1.4.0
collective.lineage = 2.1.1

# Required by:
# collective.multitheme==1.0
collective.themefragments = 2.11.1

# Required by:
# medialog.iconpicker==0.6.3.2
lineage.registry = 1.4.0

# Required by:
# collective.multitheme==1.0
# medialog.iconpicker==0.6.3.2
medialog.controlpanel = 1.1.3

# Required by:
# collective.multitheme==1.0
plone.app.themingplugins = 1.0

# Required by:
# collective.multitheme==1.0
webcouturier.dropdownmenu = 3.0.2

OK how about trying this then:

# NOTE: This file should be copied into the buildout root directory. It
# should never be checked in to version control so that the environment
# stays the same over time.
# 
#     $ cd path/to/your-buildout
#     $ cp profiles/buildout.cfg_tmpl buildout.cfg

[buildout]
index = https://pypi.python.org/simple/
# Once copied to the root, select the environment you are releasing to
# by uncommenting the appropriate line below.
extends =
#    profiles/local.cfg
    profiles/testing.cfg
#    profiles/prod.cfg
#    profiles/staging.cfg

[instance]
eggs += collective.multitheme

can we see what's in your testing.cfg? is there a reason why you chose to use testing.cfg rather than, say, local.cfg?

I'm progressing!
Your buildout.cfg seems to work @tkimnguyen ! I see the multitheme installation in the windows CMD but there's an error message:

C:\Users\Antoine>C:/plonecms/buildout/env/Scripts/buildout.exe -c C:/plonecms/buildout/buildout.cfg
Not upgrading because not running a local buildout command.
Uninstalling instance.
Updating _mr.developer.
Installing instance.
c:\plonecms\buildout\env\lib\site-packages\pkg_resources\__init__.py:187: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,
Version and requirements information containing plone.app.blocks:
  [versions] constraint on plone.app.blocks: 3.0.1
  Requirement of collective.multitheme: plone.app.blocks>=4.1.1
While:
  Installing instance.
Error: The requirement ('plone.app.blocks>=4.1.1') is not allowed by your [versions] constraint (3.0.1)

Here is my testing.cfg, there's honestly no reason why I use testing.cfg instead of local.cfg ! It was like that at the installation so I let it like that :slight_smile:
[buildout]
extends = release.cfg

base-parts -=
    zeoserver

parts -=
    instance-debug

[instance]
zeo-client = False
zeo-address =
shared-blob = off
blob-storage = ${buildout:directory}/var/blobstorage

Which one do you mean? The one I tried (simple.cfg) did not have that version conflict.

the simple.cfg didn't work and I had this error message:

Getting distribution for 'setuptools==24.3.0'.
While:
  Installing.
  Checking for upgrades.
  Getting distribution for 'setuptools==24.3.0'.
Error: Couldn't find a distribution for 'setuptools==24.3.0'.

The other one with the eggs in the instance part worked well but have this version conflict...

@espenmn do you have any informations about this version conflict?...

Hi

I a off for a few days (vacation), but the version conflict you describe might come from plone.app.mosaic.

(try to add the versions described there ( https://github.com/plone/plone.app.mosaic/blob/master/versions.cfg )

You should read about 'pinning versions' (when someone make an add on, they test it with different versions, and if you have several add-ons these might conflict. In most cases, using different versions is no problem.

The easy way to get around this if you dont know 'where to put the versions' is in the last part of buildout.cfg ( where there should be a 'versions' section)

It works !!!! Thanks to you all ! especially @espenmn i've been boring lol
Thanks :slight_smile:

For the record, what was it?