summaryrefslogtreecommitdiffstats
path: root/buildout.cfg
blob: 158b125ca94fbc463d85c3c2ebc423bc2118ae6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# main buildout section.
# Format is a simple configparser - ini syntax
# 
[buildout]
# these are steps executed in sequence
parts =
    consolescripts
    accepttests
    sphinxbuilder
# path to Python packages to develop
develop = ${buildout:rpmdeplintpath}
          ${buildout:rpmfluffpath}
# list of versions to pin packages to
versions = versions
# additional variables referenced throughout this config
rpmdeplintpath = ../rpmdeplint
rpmfluffpath = ../rpmfluff

[versions]
pytest = 2.7.3
py = 1.4.30
sphinx = 1.2.3

# configuration for parts
#
# each part uses a recipe, which is a Python package by itself implementing an
# interface
#
# https://pypi.python.org/pypi/zc.buildout/2.5.2#recipes
#

#
# Create console scripts from these eggs in ${buildout:directory}/bin
#
[consolescripts]
recipe = zc.recipe.egg
eggs = rpmdeplint
       pytest
       rpmfluff
#
# Reason to not use Python eggs here to run our tests is the difference how
# tests are run in our CI
#
[accepttests]
recipe = collective.recipe.template
input = inline:
    #!/bin/bash
    # Run tests in the same steps as it is run in Jenkins
    set -xe
    scratch=$(mktemp -d -t buildroot.XXXXXX)

    cd ${buildout:rpmdeplintpath} && python setup.py install --root $scratch

    PYTHONPATH=$scratch/usr/lib/python2.7/site-packages \
    PATH=$scratch/usr/bin:$PATH \
    ${buildout:directory}/bin/py.test ${buildout:rpmdeplintpath}/acceptance_tests $@

    PYTHONPATH=$scratch/usr/lib/python2.7/site-packages \
    PATH=$scratch/usr/bin:$PATH \
    ${buildout:directory}/bin/py.test ${buildout:rpmdeplintpath}/rpmdeplint $@

    rm -rf $scratch
mode = 755
output = bin/test

#
# Create the docs
#
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/../rpmdeplint/docs
build = ${buildout:directory}/docs-build
eggs = rpmdeplint
outputs = html
          man