Sync with openstack-dev/cookiecutter
Update boilerplate content, modernize for more recent PBR advancements, and get tests and style checks working. Change-Id: I86b6a171d2d81dd870f092542d2f4569a6772fac
This commit is contained in:
parent
75c44919d1
commit
0407bb62a3
6
.coveragerc
Normal file
6
.coveragerc
Normal file
@ -0,0 +1,6 @@
|
||||
[run]
|
||||
branch = True
|
||||
source = bindep
|
||||
|
||||
[report]
|
||||
ignore-errors = True
|
49
.gitignore
vendored
49
.gitignore
vendored
@ -1,13 +1,9 @@
|
||||
# Compiled files
|
||||
*.py[co]
|
||||
*.a
|
||||
*.o
|
||||
*.py[cod]
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Sphinx
|
||||
_build
|
||||
|
||||
# Packages/installer info
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist
|
||||
@ -19,16 +15,39 @@ var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
lib
|
||||
lib64
|
||||
|
||||
# Other
|
||||
.testrepository
|
||||
.tox
|
||||
.*.swp
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
cover
|
||||
.tox
|
||||
nosetests.xml
|
||||
.testrepository
|
||||
.venv
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# Complexity
|
||||
output/*.html
|
||||
output/*/index.html
|
||||
|
||||
# Sphinx
|
||||
doc/build
|
||||
|
||||
# pbr generates these
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
|
||||
# Editor files
|
||||
# Editors
|
||||
*~
|
||||
*.swp
|
||||
.*.swp
|
||||
.*sw?
|
||||
|
3
.mailmap
Normal file
3
.mailmap
Normal file
@ -0,0 +1,3 @@
|
||||
# Format is:
|
||||
# <preferred e-mail> <other e-mail 1>
|
||||
# <preferred e-mail> <other e-mail 2>
|
@ -1,4 +1,7 @@
|
||||
[DEFAULT]
|
||||
test_command=${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
|
@ -1,13 +1,5 @@
|
||||
include AUTHORS
|
||||
include ChangeLog
|
||||
include CONTRIBUTING.rst
|
||||
include LICENSE
|
||||
include README.rst
|
||||
include other-requirements.txt
|
||||
include requirements.txt
|
||||
include test-requirements.txt
|
||||
include tox.ini
|
||||
recursive-include doc *
|
||||
exclude .gitignore
|
||||
exclude .gitreview
|
||||
|
||||
|
@ -231,4 +231,3 @@ class TestEval(TestCase):
|
||||
self.assertEqual(False, _eval("3.5-ubuntu", ">=", "4"))
|
||||
self.assertEqual(True, _eval("4", ">=", "3.5-ubuntu"))
|
||||
self.assertEqual(True, _eval("4", ">=", "4"))
|
||||
|
||||
|
@ -131,4 +131,3 @@ class TestMain(TestCase):
|
||||
"""), logger.output)
|
||||
self.addCleanup(mocker.VerifyAll)
|
||||
self.addCleanup(mocker.UnsetStubs)
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
d2to1>=0.2.10,<0.3
|
||||
pbr
|
||||
pbr>=0.6,!=0.7,<1.0
|
||||
Parsley
|
||||
|
30
setup.cfg
30
setup.cfg
@ -1,32 +1,36 @@
|
||||
[metadata]
|
||||
name = bindep
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
summary = Binary dependency utility
|
||||
description-file =
|
||||
README.rst
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://pypi.python.org/pypi/bindep
|
||||
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
|
||||
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 =
|
||||
bindep
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[pbr]
|
||||
warnerrors = True
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
bindep = bindep.main:main
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
all_files = 1
|
||||
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
13
setup.py
13
setup.py
@ -16,7 +16,14 @@
|
||||
|
||||
import setuptools
|
||||
|
||||
# In python < 2.7.4, a lazy loading of package `pbr` will break
|
||||
# setuptools if some other modules registered functions in `atexit`.
|
||||
# solution from: http://bugs.python.org/issue15881#msg170215
|
||||
try:
|
||||
import multiprocessing # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['d2to1>=0.2.10,<0.3', 'pbr'],
|
||||
d2to1=True,
|
||||
)
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
|
@ -1,7 +1,8 @@
|
||||
hacking>=0.10.0,<0.11
|
||||
|
||||
coverage>=3.6
|
||||
discover
|
||||
fixtures>=0.3.12
|
||||
flake8
|
||||
mox==0.5.3
|
||||
python-subunit
|
||||
sphinx>=1.1.2
|
||||
|
39
tox.ini
39
tox.ini
@ -1,37 +1,32 @@
|
||||
[tox]
|
||||
envlist = py26,py27,pep8
|
||||
envlist = py34,py26,py27,pypy,pep8
|
||||
skipdist = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
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
|
||||
python setup.py test --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:pep8]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
hacking
|
||||
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,build
|
||||
show-source = true
|
||||
# E125 disabled because if (foo\n bar...): is cromulent.
|
||||
ignore = H302,W391,E125
|
||||
[testenv:cover]
|
||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
show-source = True
|
||||
ignore = E123,E125,E129,H
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
Loading…
Reference in New Issue
Block a user