PasteScript template

Description:PasteScript Template to generate a GitHub hosted python package.

Let you set the package name, a one line description, the Licence (support GPL, LGPL, AGPL and BSD - GPLv3 by default) and the author name, email and organisation variables:

paster create -t gh_package <project name>

The result:

<project name>/
    docs/
        
        _static
        _templates/
        conf.py
        index.rst
    <package name>/
        __init__.py
    .gitignore
    bootstrap.py
    LICENCE
    MANIFEST.in
    pavement.py
    README.rst
  • <project name>/pavement.py is the paver configuration file. All the setuptools tasks are available with paver. Paver make the creation of of new task easy. See paver documentation for more details:

    paver paverdocs
  • <project name>/docs/ will contains your documentation source. conf.py is Sphinx’ configuration file. Check Sphinx’ documentation for more details.

Note

The version number, the project name and author name(s) are set in pavement.py and shared with docs/conf.py.

However licence and copyright information are hard coded into LICENCE, pavement.py, docs/conf and <package>/__init__.py.

class github.tools.template.GithubTemplate(name)

Paver template for a GitHub hosted Python package.

post(command, output_dir, vars)
Add extra settings to pavement.py
pre(command, output_dir, vars)

Set extra template variables:

  • “year”, current year.
  • “gitignore”, set to “.gitignore”.
  • “licence_body”, licence notice of the package.
  • “gpl_type”, for gpl licences

Previous topic

overview

Next topic

Paver Task

This Page