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
|
@ -0,0 +1,6 @@
|
||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
source = bindep
|
||||||
|
|
||||||
|
[report]
|
||||||
|
ignore-errors = True
|
|
@ -1,13 +1,9 @@
|
||||||
# Compiled files
|
*.py[cod]
|
||||||
*.py[co]
|
|
||||||
*.a
|
# C extensions
|
||||||
*.o
|
|
||||||
*.so
|
*.so
|
||||||
|
|
||||||
# Sphinx
|
# Packages
|
||||||
_build
|
|
||||||
|
|
||||||
# Packages/installer info
|
|
||||||
*.egg
|
*.egg
|
||||||
*.egg-info
|
*.egg-info
|
||||||
dist
|
dist
|
||||||
|
@ -19,16 +15,39 @@ var
|
||||||
sdist
|
sdist
|
||||||
develop-eggs
|
develop-eggs
|
||||||
.installed.cfg
|
.installed.cfg
|
||||||
|
lib
|
||||||
|
lib64
|
||||||
|
|
||||||
# Other
|
# Installer logs
|
||||||
.testrepository
|
pip-log.txt
|
||||||
.tox
|
|
||||||
.*.swp
|
# Unit test / coverage reports
|
||||||
.coverage
|
.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
|
AUTHORS
|
||||||
ChangeLog
|
ChangeLog
|
||||||
|
|
||||||
# Editor files
|
# Editors
|
||||||
*~
|
*~
|
||||||
*.swp
|
.*.swp
|
||||||
|
.*sw?
|
||||||
|
|
|
@ -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]
|
[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_id_option=--load-list $IDFILE
|
||||||
test_list_option=--list
|
test_list_option=--list
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
include AUTHORS
|
include AUTHORS
|
||||||
include ChangeLog
|
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 .gitignore
|
||||||
exclude .gitreview
|
exclude .gitreview
|
||||||
|
|
||||||
|
|
|
@ -231,4 +231,3 @@ class TestEval(TestCase):
|
||||||
self.assertEqual(False, _eval("3.5-ubuntu", ">=", "4"))
|
self.assertEqual(False, _eval("3.5-ubuntu", ">=", "4"))
|
||||||
self.assertEqual(True, _eval("4", ">=", "3.5-ubuntu"))
|
self.assertEqual(True, _eval("4", ">=", "3.5-ubuntu"))
|
||||||
self.assertEqual(True, _eval("4", ">=", "4"))
|
self.assertEqual(True, _eval("4", ">=", "4"))
|
||||||
|
|
||||||
|
|
|
@ -131,4 +131,3 @@ class TestMain(TestCase):
|
||||||
"""), logger.output)
|
"""), logger.output)
|
||||||
self.addCleanup(mocker.VerifyAll)
|
self.addCleanup(mocker.VerifyAll)
|
||||||
self.addCleanup(mocker.UnsetStubs)
|
self.addCleanup(mocker.UnsetStubs)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
d2to1>=0.2.10,<0.3
|
pbr>=0.6,!=0.7,<1.0
|
||||||
pbr
|
|
||||||
Parsley
|
Parsley
|
||||||
|
|
30
setup.cfg
30
setup.cfg
|
@ -1,32 +1,36 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = bindep
|
name = bindep
|
||||||
author = OpenStack
|
|
||||||
author-email = openstack-dev@lists.openstack.org
|
|
||||||
summary = Binary dependency utility
|
summary = Binary dependency utility
|
||||||
description-file =
|
description-file =
|
||||||
README.rst
|
README.rst
|
||||||
|
author = OpenStack
|
||||||
|
author-email = openstack-dev@lists.openstack.org
|
||||||
home-page = http://pypi.python.org/pypi/bindep
|
home-page = http://pypi.python.org/pypi/bindep
|
||||||
classifier =
|
classifier =
|
||||||
Development Status :: 4 - Beta
|
Development Status :: 4 - Beta
|
||||||
Environment :: Console
|
Environment :: Console
|
||||||
Environment :: OpenStack
|
Environment :: OpenStack
|
||||||
Intended Audience :: Developers
|
Intended Audience :: Developers
|
||||||
Intended Audience :: Information Technology
|
Intended Audience :: Information Technology
|
||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: OS Independent
|
Operating System :: OS Independent
|
||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
bindep
|
bindep
|
||||||
|
|
||||||
[global]
|
|
||||||
setup-hooks =
|
|
||||||
pbr.hooks.setup_hook
|
|
||||||
|
|
||||||
[pbr]
|
[pbr]
|
||||||
warnerrors = True
|
warnerrors = True
|
||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
console_scripts =
|
console_scripts =
|
||||||
bindep = bindep.main:main
|
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
|
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(
|
setuptools.setup(
|
||||||
setup_requires=['d2to1>=0.2.10,<0.3', 'pbr'],
|
setup_requires=['pbr'],
|
||||||
d2to1=True,
|
pbr=True)
|
||||||
)
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
hacking>=0.10.0,<0.11
|
||||||
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
discover
|
discover
|
||||||
fixtures>=0.3.12
|
fixtures>=0.3.12
|
||||||
flake8
|
|
||||||
mox==0.5.3
|
mox==0.5.3
|
||||||
python-subunit
|
python-subunit
|
||||||
sphinx>=1.1.2
|
sphinx>=1.1.2
|
||||||
|
|
39
tox.ini
39
tox.ini
|
@ -1,37 +1,32 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py26,py27,pep8
|
envlist = py34,py26,py27,pypy,pep8
|
||||||
|
skipdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
usedevelop = True
|
||||||
|
install_command = pip install -U {opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
LANG=en_US.UTF-8
|
|
||||||
LANGUAGE=en_US:en
|
|
||||||
LC_ALL=C
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --slowest --testr-args='{posargs}'
|
python setup.py test --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[tox:jenkins]
|
|
||||||
sitepackages = True
|
|
||||||
downloadcache = ~/cache/pip
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
hacking
|
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
[testenv:cover]
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
|
||||||
commands =
|
|
||||||
python setup.py testr --coverage
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[testenv:cover]
|
||||||
exclude = .venv,.tox,dist,doc,*.egg,build
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||||
show-source = true
|
|
||||||
# E125 disabled because if (foo\n bar...): is cromulent.
|
|
||||||
ignore = H302,W391,E125
|
|
||||||
|
|
||||||
|
[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