Modifying add on

i want to change collective.googleanalytics which is availabe on github
how is the procedure?

i should be more precise:
i want to download the available source for github to my plone-installation and want to modify parts of the sources, and want to use that instead of the standard add on: collective.googleanalytics

You can create a fork of the repository, and add the forked repo in the [sources] section of your buildout config.

I copied the sources from github to the "src"-directory.
What do i have to change within the buildout.cfg in order that the source is compiled and used instead of the standard egg?

mr.developer [] can help with this. If not already in your buildout, you will need:

extensions = mr.developer

always-checkout = force
auto-checkout = *


collective.googleanalytics = git[your-username]/collective.googleanalytics.git

This will automatically check it out into src/ and make it a develop egg. See the link for more options. Note you may not want these same settings on production, but will get you set up locally.

Hi Chrissy,

two more questions please:
because i'm using Plone 4.3, i need the version: collective.googleanalytics-1.5.0 - how do i specify it in the [sources]-section? Do i've to remove the entry collective.googleanalytics in the eggs-section of the buildout?

When you fork the repo, you should also get all the branches, and there is a 4.3-compat branch. You can specify it this way:

collective.googleanalytics = git[your-username]/collective.googleanalytics.git branch=4.3-compat

And you will need to keep it listed in the eggs section.

1 Like

Actually, that may be an older branch, you'll want to check. You can also create a new branch in your fork from a specific commit, and work from that.