Add oslo-config project infrastructure

This commit is contained in:
Mark McLoughlin 2013-01-21 09:12:55 +00:00
parent 27cc655c80
commit 8c6a4c7523
10 changed files with 140 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
*~
*.swp
*.pyc
*.log
.tox
.coverage
oslo_config.egg-info/
build/
dist/

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/oslo-config.git

1
README Normal file
View File

@ -0,0 +1 @@
Oslo configuration library.

17
oslo/__init__.py Normal file
View File

@ -0,0 +1,17 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, Inc.
#
# 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.
__import__('pkg_resources').declare_namespace(__name__)

15
oslo/config/__init__.py Normal file
View File

@ -0,0 +1,15 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, Inc.
#
# 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.

48
setup.py Normal file
View File

@ -0,0 +1,48 @@
#!/usr/bin/python
# Copyright 2013 Red Hat, Inc.
#
# 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.
import setuptools
from magic.openstack.common import setup
requires = setup.parse_requirements()
depend_links = setup.parse_dependency_links()
tests_require = setup.parse_requirements(['tools/test-requires'])
setuptools.setup(
name='oslo-config',
version=setup.get_post_version('oslo/config'),
description='Oslo configuration API',
long_description='The Oslo configuration API supports parsing command '
'line arguments and .ini style configuration files.',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.6', ],
author='OpenStack',
author_email='openstack-dev@lists.openstack.org',
url='http://www.openstack.org/',
license='Apache Software License',
packages=['oslo.config', 'tests'],
namespace_packages=['oslo'],
install_requires=requires,
tests_require=tests_require,
setup_requires=['setuptools-git>=0.4'],
dependency_links=depend_links,
)

15
tests/__init__.py Normal file
View File

@ -0,0 +1,15 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, Inc.
#
# 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.

1
tools/pip-requires Normal file
View File

@ -0,0 +1 @@
argparse

8
tools/test-requires Normal file
View File

@ -0,0 +1,8 @@
mox
nose
nose-exclude
# when we can require tox>= 1.4, this can go into tox.ini:
# [testenv:cover]
# deps = {[testenv]deps} coverage
coverage

22
tox.ini Normal file
View File

@ -0,0 +1,22 @@
[tox]
envlist = py26,py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
commands = nosetests --with-doctest --exclude-dir=tests/testmods {posargs}
[testenv:pep8]
deps = pep8==1.3.3
commands = pep8 --repeat --show-source --exclude=.tox,dist,*.egg --ignore=E125 .
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
commands = {posargs}
[testenv:pyflakes]
deps = pyflakes
commands = pyflakes oslo setup.py