summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-01-21 09:12:55 +0000
committerMark McLoughlin <markmc@redhat.com>2013-01-21 09:58:17 +0000
commit8c6a4c7523910e0745ae06194fa9484e45feb190 (patch)
treea10e5adb81a30ab3b72ac6e1abc1b28d402fdc42
parent27cc655c8046d5f3d59c72934ed11067e0e1e8f1 (diff)
downloadoslo-config-8c6a4c7523910e0745ae06194fa9484e45feb190.tar.gz
Add oslo-config project infrastructure
-rw-r--r--.gitignore9
-rw-r--r--.gitreview4
-rw-r--r--README1
-rw-r--r--oslo/__init__.py17
-rw-r--r--oslo/config/__init__.py15
-rw-r--r--setup.py48
-rw-r--r--tests/__init__.py15
-rw-r--r--tools/pip-requires1
-rw-r--r--tools/test-requires8
-rw-r--r--tox.ini22
10 files changed, 140 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8471f1b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*~
+*.swp
+*.pyc
+*.log
+.tox
+.coverage
+oslo_config.egg-info/
+build/
+dist/
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..1a4bd5d
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=review.openstack.org
+port=29418
+project=openstack/oslo-config.git
diff --git a/README b/README
new file mode 100644
index 0000000..ce9556f
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+Oslo configuration library.
diff --git a/oslo/__init__.py b/oslo/__init__.py
new file mode 100644
index 0000000..8aee389
--- /dev/null
+++ b/oslo/__init__.py
@@ -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__)
diff --git a/oslo/config/__init__.py b/oslo/config/__init__.py
new file mode 100644
index 0000000..e5f41ad
--- /dev/null
+++ b/oslo/config/__init__.py
@@ -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.
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..3f565be
--- /dev/null
+++ b/setup.py
@@ -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,
+)
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e5f41ad
--- /dev/null
+++ b/tests/__init__.py
@@ -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.
diff --git a/tools/pip-requires b/tools/pip-requires
new file mode 100644
index 0000000..1352d5e
--- /dev/null
+++ b/tools/pip-requires
@@ -0,0 +1 @@
+argparse
diff --git a/tools/test-requires b/tools/test-requires
new file mode 100644
index 0000000..264047e
--- /dev/null
+++ b/tools/test-requires
@@ -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
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..bd066f6
--- /dev/null
+++ b/tox.ini
@@ -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