Browse Source

Migrate to pbr and testr.

changes/89/25589/1
Monty Taylor 9 years ago
parent
commit
49c060a313
  1. 5
      .gitignore
  2. 4
      .testr.conf
  3. 2
      requirements.txt
  4. 3
      run_tests.sh
  5. 34
      setup.cfg
  6. 41
      setup.py
  7. 8
      test-requirements.txt
  8. 31
      tox.ini

5
.gitignore

@ -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

@ -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

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

3
run_tests.sh

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

34
setup.cfg

@ -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

41
setup.py

@ -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

@ -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

@ -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
Loading…
Cancel
Save