gorilla-catalog / template

Full commit
'''A short description of the package/project.'''

# This is a gorilla card file.  It describes the details gorilla needs to know
# to install a single package.

# Everything except "name" and "sources" is optional.  Feel free to delete
# unneeded items from the file if you like to keep things looking clean.

name = 'project'
homepage = 'http://.../'

# One or many sources can be specified.
# If multiple URLs are given for the same source they will be tried in order.
sources = {
    'hg': [
    'git': [
    'static': {
        'latest': '',
        '1.1': '',
        '1.0': '',

# These will be run in the cloned or unextracted directory before symlinking.
# They should NOT affect ANYTHING outside of this directory.
build_commands = [
    'make local',

# These will be symlinked into gorilla's lib directory, which users will add
# to their $PYTHONPATH.
packages = [

# These will be symlinked into gorilla's bin directory, which users will add
# to their $PATH.
scripts = [

# Simple tests can be run to make sure the install was successful.
# The keys are the commands to run, the values are regexes which the output
# of the commands should match.
tests = {
    'python -c "import project"': '^$',
    'project-tool --version':     '^project version [\d.]+$',

# Most projects use a sane version numbering and tagging scheme like 1.0,
# 1.0.1, 1.1, etc.  Unfortunately, some don't.
# To support those annoying edge cases we allow cards to define a parse_tags
# function that takes a list of strings representing the tags in the project
# repository and returns a sorted list representing the versions.
# This lets you filter out non-version tags for a project and handle any
# non-easily-sortable version numbering schemes.
# If your project is like most is that it uses a normal version numbering
# scheme you can delete this function.
def parse_tags(tags):
    # filter non-version tags
    # sort the tags
    return tags