Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install leocornus.recipe.wpmw

How to install leocornus.recipe.wpmw

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install leocornus.recipe.wpmw
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.3.0 Available View build log
1.1.1 Available View build log
1.1.0 Available View build log
1.0.1 Available View build log
1.0.0 Available View build log
Windows (64-bit)
1.3.0 Available View build log
1.1.1 Available View build log
1.1.0 Available View build log
1.0.1 Available View build log
1.0.0 Available View build log
Mac OS X (10.5+)
1.3.0 Available View build log
1.1.1 Available View build log
1.1.0 Available View build log
1.0.1 Available View build log
1.0.0 Available View build log
Linux (32-bit)
1.3.0 Available View build log
1.1.1 Available View build log
1.1.0 Available View build log
1.0.1 Available View build log
1.0.0 Available View build log
Linux (64-bit)
1.3.0 Available View build log
1.1.1 Available View build log
1.1.0 Available View build log
1.0.1 Available View build log
1.0.0 Available View build log
 
Author
License
GPLv2
Lastest release
version 1.3.0 on May 23rd, 2012

leocornus.recipe.wpmw

A buildout recipe trying to provide an easy way to manage WordPress Plugins, themes and MediaWiki Extenstions.

Detailed Documentation

This recipe should have 2 major functions: WordPress Plugins and MediaWiki Extensions

Options

The leocornus.recipe.wpmw:Plugins recipe could be used to download WordPress Plugins package, extract to certain folder, and create the symlink to WordPress wp-content/plugins folder. It supports the following general options:

Options for all recipes:

ignore-existing

Default is true, ignore existing folder.

Options for deploy recipe:

packages

A list of packages id and version at format id=version. e.g. SomeSkin=1.1

packages-repo

The base URL, where we could download the packages.

destination

The target folder where the packages are extracted to.

action

There are 2 values for this option: symlink and copy. Default value is symlink. This option will be ignored for symlink and download recipes.

Options for symlink recipe:

target-folder

the target folder, from which we create symlink to the link_name.

link-folder

the link folder will have all the link names.

names

the names used to create the symlink. The following command will be used: $ ln -s target_folder/name link_folder/name

zc.buildout built in a set of easy to use functions to simplfy the testing for buildout recipe. Check http://pypi.python.org/pypi/zc.buildout/1.5.2#testing-support for more details.

Examples for deploy recipe

Prepare the testing server for download

>>> import os.path
>>> testdir = join(os.path.dirname(__file__), 'testdata')
>>> server = start_server(testdir)

Get ready the testing folders.

>>> dest = tmpdir('dest')
>>> mkdir(dest, 'extensions')
>>> mkdir(dest, 'plugins')
>>> ls(dest)
d  extensions
d  plugins

try to crate a symlink in plugins folder to test the unlink function.

>>> import os
>>> bp = tmpdir('bp-fake')
>>> print bp
/tmp/.../bp-fake
>>> os.symlink(bp, os.path.join(dest, 'plugins', 'buddypress'))
>>> ls(dest, 'plugins')
d  buddypress

create a broken symlink, we have to use os.path.lexists to check the link name exist or not.

>>> bplink = tmpdir('bp-link')
>>> os.symlink(bplink, os.path.join(dest, 'plugins', 'buddypress-links'))
>>> ls(dest, 'plugins')
d  buddypress
d  buddypress-links
>>> remove(bplink)
>>> ls(dest, 'plugins')
d  buddypress
l  buddypress-links

Buildout file to testing deployment with default symlink action.

>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... parts =
...     wpplugins
...     mwextensions
...
... [wpplugins]
... recipe = leocornus.recipe.wpmw:deploy
... packages =
...     buddypress=1.5.1
...     bp-moderation=0.1.4
...     buddypress-links=0.5
... packages-repo = http://downloads.wordpress.org/plugin
... destination = %(dest)s/plugins
...
... [mwextensions]
... recipe = leocornus.recipe.wpmw:deploy
... packages =
...     Cite=r37577
...     SemanticForms=1.9.1
...     SemanticMediaWiki=1.5.1
... packages-repo = %(server)srepos
... destination = %(dest)s/extensions
... """ % dict(server=server, dest=dest))

Run the buildout

>>> print system(buildout)
Installing wpplugins.
Downloading http://downloads.wordpress.org/plugin/buddypress.1.5.1.zip
wpplugins: Extracting package to .../sample-buildout/parts/wpplugins/buddypress-1.5.1
wpplugins: Create symlink to .../dest/plugins/buddypress
Downloading http://downloads.wordpress.org/plugin/bp-moderation.0.1.4.zip
wpplugins: Extracting package to .../sample-buildout/parts/wpplugins/bp-moderation-0.1.4
wpplugins: Create symlink to .../dest/plugins/bp-moderation
Downloading http://downloads.wordpress.org/plugin/buddypress-links.0.5.zip
wpplugins: Extracting package to .../sample-buildout/parts/wpplugins/buddypress-links-0.5
wpplugins: Create symlink to .../dest/plugins/buddypress-links
Installing mwextensions.
Downloading http://.../repos/Cite.r37577.zip
mwextensions: Extracting package to .../sample-buildout/parts/mwextensions/Cite-r37577
mwextensions: Create symlink to .../dest/extensions/Cite
Downloading http://.../repos/SemanticForms.1.9.1.zip
mwextensions: Extracting package to .../sample-buildout/parts/mwextensions/SemanticForms-1.9.1
mwextensions: Create symlink to .../dest/extensions/SemanticForms
Downloading http://.../repos/SemanticMediaWiki.1.5.1.zip
mwextensions: Extracting package to .../sample-buildout/parts/mwextensions/SemanticMediaWiki-1.5.1
mwextensions: Create symlink to .../dest/extensions/SemanticMediaWiki

Check the destnation folder

>>> ls(dest, 'plugins')
d  bp-moderation
d  buddypress
d  buddypress-links
>>> ls(dest, 'extensions')
d  Cite
d  SemanticForms
d  SemanticMediaWiki

Now, let's try the hard copy action.

>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... parts =
...     wpplugins
...     mwextensions
...
... [wpplugins]
... recipe = leocornus.recipe.wpmw:deploy
... action = copy
... packages =
...     buddypress=1.5.1
...     bp-moderation=0.1.4
...     buddypress-links=0.5
... packages-repo = http://downloads.wordpress.org/plugin
... destination = %(dest)s/plugins
...
... [mwextensions]
... recipe = leocornus.recipe.wpmw:deploy
... action = copy
... packages =
...     Cite=r37577
...     SemanticForms=1.9.1
...     SemanticMediaWiki=1.5.1
... packages-repo = %(server)srepos
... destination = %(dest)s/extensions
... """ % dict(server=server, dest=dest))
>>> print system(buildout)
Uninstalling mwextensions.
Uninstalling wpplugins.
Installing wpplugins.
wpplugins: Extracting package to .../sample-buildout/parts/wpplugins/buddypress-1.5.1
wpplugins: Rename to .../dest/plugins/buddypress
wpplugins: Extracting package to .../sample-buildout/parts/wpplugins/bp-moderation-0.1.4
wpplugins: Rename to .../dest/plugins/bp-moderation
wpplugins: Extracting package to .../sample-buildout/parts/wpplugins/buddypress-links-0.5
wpplugins: Rename to .../dest/plugins/buddypress-links
Installing mwextensions.
mwextensions: Extracting package to .../sample-buildout/parts/mwextensions/Cite-r37577
mwextensions: Rename to .../dest/extensions/Cite
mwextensions: Extracting package to .../sample-buildout/parts/mwextensions/SemanticForms-1.9.1
mwextensions: Rename to .../dest/extensions/SemanticForms
mwextensions: Extracting package to .../sample-buildout/parts/mwextensions/SemanticMediaWiki-1.5.1
mwextensions: Rename to .../dest/extensions/SemanticMediaWiki
>>> ls(dest, 'plugins')
d  bp-moderation
d  buddypress
d  buddypress-links
>>> ls(dest, 'extensions')
d  Cite
d  SemanticForms
d  SemanticMediaWiki

1.3.0 (2012-04-05)

  • Using the deploy recipe to replace both plugins and extensions recipes. Both recipes pretty much do the same work.

1.2.0 (2012-03-23)

  • Adding the action option for both plugins and extensions recipes. It has symlink as the default value and copy to do hardcopy instead.

1.1.1 (2012-03-09)

  • Make sure to create symlinks during buildout updating.

1.1.0 (2012-03-07)

  • Add the part directory to install result, so buildout will remove it during uninstalling.
  • New symlinks recipe to create symlinks from target folder to link folder for all names.

1.0.1 (2012-03-06)

  • Using os.path.lexists instead of os.path.exists to make sure the broken symlinks got removed.

1.0.0 (2012-03-05)

  • Initial release
Download

Subscribe to package updates

Last updated May 23rd, 2012

Download Stats

Last month:5

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.