Browse Source

Sync with openstack-dev/cookiecutter

Update boilerplate content, modernize for more recent PBR
advancements, and get tests and style checks working.

Change-Id: I86b6a171d2d81dd870f092542d2f4569a6772fac
changes/98/158098/2
Jeremy Stanley 7 years ago
parent
commit
0407bb62a3
  1. 6
      .coveragerc
  2. 49
      .gitignore
  3. 3
      .mailmap
  4. 5
      .testr.conf
  5. 8
      MANIFEST.in
  6. 1
      bindep/tests/test_depends.py
  7. 1
      bindep/tests/test_main.py
  8. 3
      requirements.txt
  9. 30
      setup.cfg
  10. 13
      setup.py
  11. 3
      test-requirements.txt
  12. 37
      tox.ini

6
.coveragerc

@ -0,0 +1,6 @@
[run]
branch = True
source = bindep
[report]
ignore-errors = True

49
.gitignore vendored

@ -1,13 +1,9 @@
# Compiled files
*.py[co]
*.a
*.o
*.so
*.py[cod]
# Sphinx
_build
# C extensions
*.so
# 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

@ -0,0 +1,3 @@
# Format is:
# <preferred e-mail> <other e-mail 1>
# <preferred e-mail> <other e-mail 2>

5
.testr.conf

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

8
MANIFEST.in

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

1
bindep/tests/test_depends.py

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

1
bindep/tests/test_main.py

@ -131,4 +131,3 @@ class TestMain(TestCase):
"""), logger.output)
self.addCleanup(mocker.VerifyAll)
self.addCleanup(mocker.UnsetStubs)

3
requirements.txt

@ -1,3 +1,2 @@
d2to1>=0.2.10,<0.3
pbr
pbr>=0.6,!=0.7,<1.0
Parsley

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

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

3
test-requirements.txt

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

37
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}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
[flake8]
exclude = .venv,.tox,dist,doc,*.egg,build
show-source = true
# E125 disabled because if (foo\n bar...): is cromulent.
ignore = H302,W391,E125
# 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…
Cancel
Save