Migrate to pbr and testr.

This commit is contained in:
Monty Taylor 2013-03-28 02:37:45 +01:00
parent 354297435d
commit 49c060a313
8 changed files with 104 additions and 24 deletions

5
.gitignore vendored
View File

@ -23,6 +23,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.testrepository
.tox
nosetests.xml
@ -33,3 +34,7 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject
# OpenStack Generated Files
AUTHORS
ChangeLog

4
.testr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
anyjson
pystache

View File

@ -1,2 +1 @@
flake8 --verbose `find . -name '*.py'`
nosetests
tox

34
setup.cfg Normal file
View File

@ -0,0 +1,34 @@
[metadata]
name = os-config-applier
author = OpenStack
author-email = openstack-dev@lists.openstack.org
summary = OpenStack configuration from cloud metadata
description-file =
README.md
home-page = http://github.com/tripleo/os-config-applier
classifier =
Development Status :: 4 - Beta
Environment :: Console
Environment :: OpenStack
Intended Audience :: Developers
Intended Audience :: Information Technology
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
[files]
packages =
os_config_applier
[global]
setup-hooks =
pbr.hooks.setup_hook
[entry_points]
console_scripts =
os-config-applier = os_config_applier.os_config_applier:main
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0

View File

@ -1,24 +1,21 @@
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
#!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
config = {
'name': 'os-config-applier',
'description': 'applies configuration from cloud metadata.',
'author': 'echohead',
'author_email': 'tim.miller.0@gmail.com',
'url': 'http://github.com/tripleo/os-config-applier',
'version': '0.3',
'install_requires': ['nose'],
'packages': ['os_config_applier'],
'scripts': [],
'install_requires': ['pystache', 'anyjson'],
# 'long_description': open('README.md').read(),
'entry_points': {
'console_scripts': [
'os-config-applier = os_config_applier.os_config_applier:main']
}
}
import setuptools
setup(**config)
setuptools.setup(
setup_requires=['d2to1', 'pbr'],
d2to1=True)

8
test-requirements.txt Normal file
View File

@ -0,0 +1,8 @@
coverage>=3.6
discover
fixtures>=0.3.12
python-subunit
sphinx>=1.1.2
testrepository>=0.0.13
testscenarios
testtools>=0.9.27

31
tox.ini Normal file
View File

@ -0,0 +1,31 @@
[tox]
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs}'
[tox:jenkins]
sitepackages = True
downloadcache = ~/cache/pip
[testenv:pep8]
commands = flake8
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage
[testenv:venv]
commands = {posargs}
[flake8]
exclude = .venv,.tox,dist,doc,*.egg
show-source = true