Browse Source

Use pbr, pep8 checks & fixes, add "doc" tox target

Change-Id: I1f01e4e5407a8216c7c867c143d15db2037e16d6
changes/55/90455/12
Marc Abramowitz 8 years ago
committed by Khai Do
parent
commit
129fd8ca3c
  1. 6
      .gitignore
  2. 4
      .testr.conf
  3. 28
      setup.cfg
  4. 15
      setup.py
  5. 6
      test-requirements.txt
  6. 8
      tox.ini

6
.gitignore

@ -7,3 +7,9 @@
/MANIFEST
/dist/*
/doc/build/*
/.test
/.testrepository
/MANIFEST
/.coverage
/coverage*.xml
/junit*.xml

4
.testr.conf

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

28
setup.cfg

@ -0,0 +1,28 @@
[metadata]
name = python-jenkins
author = Ken Conley
author_email = kwc@willowgarage.com
maintainer = OpenStack
maintainer_email = openstack@lists.launchpad.net
description = Python bindings for the remote Jenkins API
license = BSD
home-page = http://git.openstack.org/cgit/stackforge/python-jenkins
classifiers =
Environment :: Console
Intended Audience :: Developers
Intended Audience :: Information Technology
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
[files]
packages =
jenkins
[pbr]
warnerrors = True
[build_sphinx]
all_files = 1
build-dir = doc/build
source-dir = doc/source

15
setup.py

@ -1,12 +1,5 @@
#!/usr/bin/env python
import setuptools
from distutils.core import setup
setup(name='python-jenkins',
version='0.2.1',
description='Python bindings for the remote Jenkins API',
author='Ken Conley',
author_email='kwc@willowgarage.com',
url='http://launchpad.net/python-jenkins',
packages=['jenkins'],
)
setuptools.setup(
setup_requires=['pbr'],
pbr=True)

6
test-requirements.txt

@ -1,5 +1,9 @@
coverage>=3.6
discover
flake8
hacking>=0.5.6,<0.8
mock
six
#unittest2
python-subunit
sphinx>=1.1.2,<1.2
testrepository

8
tox.ini

@ -8,7 +8,7 @@ setenv VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
commands = python -m discover
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:cover]
commands =
@ -25,11 +25,15 @@ downloadcache = ~/cache/pip
[testenv:pep8]
commands = flake8
[testenv:doc]
commands = python setup.py build_sphinx
[testenv:venv]
commands = {posargs}
[flake8]
; E501 line too long (80 > 79 characters)
ignore = E501
; H404 multi line docstring should start with a summary
ignore = E501,H404
show-source = True
exclude = .venv,.tox,dist,doc,build,*.egg
Loading…
Cancel
Save