diff --git a/README.rst b/README.rst index 3515956..b9e56f7 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,9 @@ -====================== -cookiecutter-openstack -====================== +=========================== +oslo-cookiecutter-openstack +=========================== -Cookiecutter template for an OpenStack project. See https://github.com/audreyr/cookiecutter. +Cookiecutter template for an Oslo library (part of the OpenStack +project). See https://github.com/audreyr/cookiecutter. * Free software: Apache license * pbr_: Set up to use Python Build Reasonableness @@ -17,12 +18,12 @@ Usage Generate a Python package project:: - cookiecutter https://git.openstack.org/openstack-dev/cookiecutter.git + cookiecutter https://git.openstack.org/openstack-dev/oslo-cookiecutter.git -OpenStack projects require a working git repo for pbr to work, so you need to -init a repo and commit to it before doing anything else:: +Oslo libraries require a working git repo for pbr to work, so you need +to init a repo and commit to it before doing anything else:: - cd $repo_name + cd oslo.$module_name git init git add . git commit -a diff --git a/cookiecutter.json b/cookiecutter.json index 67f6ecc..69bf4e7 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,6 +1,5 @@ { - "module_name": "replace with the name of the python module", + "module_name": "replace with the name of the package under oslo", "repo_group": "openstack", - "repo_name": "replace with the name for the git repo", - "project_short_description": "OpenStack Boilerplate contains all the boilerplate you need to create an OpenStack package." + "project_short_description": "Oslo Boilerplate contains all the boilerplate you need to create an Oslo-branded library." } diff --git a/{{cookiecutter.repo_name}}/.coveragerc b/oslo.{{cookiecutter.module_name}}/.coveragerc similarity index 100% rename from {{cookiecutter.repo_name}}/.coveragerc rename to oslo.{{cookiecutter.module_name}}/.coveragerc diff --git a/{{cookiecutter.repo_name}}/.gitignore b/oslo.{{cookiecutter.module_name}}/.gitignore similarity index 100% rename from {{cookiecutter.repo_name}}/.gitignore rename to oslo.{{cookiecutter.module_name}}/.gitignore diff --git a/oslo.{{cookiecutter.module_name}}/.gitreview b/oslo.{{cookiecutter.module_name}}/.gitreview new file mode 100644 index 0000000..10f1608 --- /dev/null +++ b/oslo.{{cookiecutter.module_name}}/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/oslo.{{cookiecutter.module_name}}.git diff --git a/{{cookiecutter.repo_name}}/.mailmap b/oslo.{{cookiecutter.module_name}}/.mailmap similarity index 100% rename from {{cookiecutter.repo_name}}/.mailmap rename to oslo.{{cookiecutter.module_name}}/.mailmap diff --git a/{{cookiecutter.repo_name}}/.testr.conf b/oslo.{{cookiecutter.module_name}}/.testr.conf similarity index 100% rename from {{cookiecutter.repo_name}}/.testr.conf rename to oslo.{{cookiecutter.module_name}}/.testr.conf diff --git a/{{cookiecutter.repo_name}}/CONTRIBUTING.rst b/oslo.{{cookiecutter.module_name}}/CONTRIBUTING.rst similarity index 88% rename from {{cookiecutter.repo_name}}/CONTRIBUTING.rst rename to oslo.{{cookiecutter.module_name}}/CONTRIBUTING.rst index c8b869b..a48ef00 100644 --- a/{{cookiecutter.repo_name}}/CONTRIBUTING.rst +++ b/oslo.{{cookiecutter.module_name}}/CONTRIBUTING.rst @@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored. Bugs should be filed on Launchpad, not GitHub: - https://bugs.launchpad.net/{{ cookiecutter.repo_name }} + https://bugs.launchpad.net/oslo.{{ cookiecutter.module_name }} diff --git a/{{cookiecutter.repo_name}}/HACKING.rst b/oslo.{{cookiecutter.module_name}}/HACKING.rst similarity index 100% rename from {{cookiecutter.repo_name}}/HACKING.rst rename to oslo.{{cookiecutter.module_name}}/HACKING.rst diff --git a/{{cookiecutter.repo_name}}/LICENSE b/oslo.{{cookiecutter.module_name}}/LICENSE similarity index 100% rename from {{cookiecutter.repo_name}}/LICENSE rename to oslo.{{cookiecutter.module_name}}/LICENSE diff --git a/{{cookiecutter.repo_name}}/MANIFEST.in b/oslo.{{cookiecutter.module_name}}/MANIFEST.in similarity index 100% rename from {{cookiecutter.repo_name}}/MANIFEST.in rename to oslo.{{cookiecutter.module_name}}/MANIFEST.in diff --git a/oslo.{{cookiecutter.module_name}}/README.rst b/oslo.{{cookiecutter.module_name}}/README.rst new file mode 100644 index 0000000..a8a527b --- /dev/null +++ b/oslo.{{cookiecutter.module_name}}/README.rst @@ -0,0 +1,13 @@ +=================================== +oslo.{{ cookiecutter.module_name }} +=================================== + +{{ cookiecutter.project_short_description}} + +* Free software: Apache license +* Documentation: http://docs.openstack.org/developer/oslo.{{ cookiecutter.module_name }} + +Features +-------- + +* TODO diff --git a/{{cookiecutter.repo_name}}/babel.cfg b/oslo.{{cookiecutter.module_name}}/babel.cfg similarity index 100% rename from {{cookiecutter.repo_name}}/babel.cfg rename to oslo.{{cookiecutter.module_name}}/babel.cfg diff --git a/{{cookiecutter.repo_name}}/doc/source/conf.py b/oslo.{{cookiecutter.module_name}}/doc/source/conf.py similarity index 96% rename from {{cookiecutter.repo_name}}/doc/source/conf.py rename to oslo.{{cookiecutter.module_name}}/doc/source/conf.py index aa62045..dafe426 100755 --- a/{{cookiecutter.repo_name}}/doc/source/conf.py +++ b/oslo.{{cookiecutter.module_name}}/doc/source/conf.py @@ -37,8 +37,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'{{cookiecutter.repo_name}}' -copyright = u'2013, OpenStack Foundation' +project = u'oslo.{{cookiecutter.module_name}}' +copyright = u'2014, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True diff --git a/{{cookiecutter.repo_name}}/doc/source/contributing.rst b/oslo.{{cookiecutter.module_name}}/doc/source/contributing.rst similarity index 100% rename from {{cookiecutter.repo_name}}/doc/source/contributing.rst rename to oslo.{{cookiecutter.module_name}}/doc/source/contributing.rst diff --git a/{{cookiecutter.repo_name}}/doc/source/index.rst b/oslo.{{cookiecutter.module_name}}/doc/source/index.rst similarity index 100% rename from {{cookiecutter.repo_name}}/doc/source/index.rst rename to oslo.{{cookiecutter.module_name}}/doc/source/index.rst diff --git a/{{cookiecutter.repo_name}}/doc/source/installation.rst b/oslo.{{cookiecutter.module_name}}/doc/source/installation.rst similarity index 100% rename from {{cookiecutter.repo_name}}/doc/source/installation.rst rename to oslo.{{cookiecutter.module_name}}/doc/source/installation.rst diff --git a/{{cookiecutter.repo_name}}/doc/source/readme.rst b/oslo.{{cookiecutter.module_name}}/doc/source/readme.rst similarity index 100% rename from {{cookiecutter.repo_name}}/doc/source/readme.rst rename to oslo.{{cookiecutter.module_name}}/doc/source/readme.rst diff --git a/{{cookiecutter.repo_name}}/doc/source/usage.rst b/oslo.{{cookiecutter.module_name}}/doc/source/usage.rst similarity index 100% rename from {{cookiecutter.repo_name}}/doc/source/usage.rst rename to oslo.{{cookiecutter.module_name}}/doc/source/usage.rst diff --git a/oslo.{{cookiecutter.module_name}}/oslo/__init__.py b/oslo.{{cookiecutter.module_name}}/oslo/__init__.py new file mode 100644 index 0000000..bf1237a --- /dev/null +++ b/oslo.{{cookiecutter.module_name}}/oslo/__init__.py @@ -0,0 +1,15 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# 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.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/__init__.py b/oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/__init__.py b/oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/__init__.py similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/__init__.py rename to oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/__init__.py diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/base.py b/oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/base.py similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/base.py rename to oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/base.py diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py b/oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py rename to oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py diff --git a/oslo.{{cookiecutter.module_name}}/requirements.txt b/oslo.{{cookiecutter.module_name}}/requirements.txt new file mode 100644 index 0000000..64db495 --- /dev/null +++ b/oslo.{{cookiecutter.module_name}}/requirements.txt @@ -0,0 +1 @@ +Babel>=0.9.6 diff --git a/{{cookiecutter.repo_name}}/setup.cfg b/oslo.{{cookiecutter.module_name}}/setup.cfg similarity index 65% rename from {{cookiecutter.repo_name}}/setup.cfg rename to oslo.{{cookiecutter.module_name}}/setup.cfg index 69eba31..f5722d1 100644 --- a/{{cookiecutter.repo_name}}/setup.cfg +++ b/oslo.{{cookiecutter.module_name}}/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = {{ cookiecutter.repo_name }} +name = oslo.{{ cookiecutter.module_name }} summary = {{ cookiecutter.project_short_description }} description-file = README.rst @@ -21,7 +21,10 @@ classifier = [files] packages = - {{ cookiecutter.module_name }} + oslo + oslo.{{ cookiecutter.module_name }} +namespace_packages = + oslo [build_sphinx] source-dir = doc/source @@ -32,15 +35,15 @@ all_files = 1 upload-dir = doc/build/html [compile_catalog] -directory = {{cookiecutter.module_name}}/locale -domain = {{cookiecutter.repo_name}} +directory = oslo.{{cookiecutter.module_name}}/locale +domain = oslo.{{cookiecutter.module_name}} [update_catalog] -domain = {{cookiecutter.repo_name}} -output_dir = {{cookiecutter.module_name}}/locale -input_file = {{cookiecutter.module_name}}/locale/{{cookiecutter.repo_name}}.pot +domain = oslo.{{cookiecutter.module_name}} +output_dir = oslo.{{cookiecutter.module_name}}/locale +input_file = oslo.{{cookiecutter.module_name}}/locale/oslo.{{cookiecutter.module_name}}.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg -output_file = {{cookiecutter.module_name}}/locale/{{cookiecutter.repo_name}}.pot +output_file = oslo.{{cookiecutter.module_name}}/locale/oslo.{{cookiecutter.module_name}}.pot diff --git a/{{cookiecutter.repo_name}}/setup.py b/oslo.{{cookiecutter.module_name}}/setup.py similarity index 94% rename from {{cookiecutter.repo_name}}/setup.py rename to oslo.{{cookiecutter.module_name}}/setup.py index 2a0786a..70c2b3f 100755 --- a/{{cookiecutter.repo_name}}/setup.py +++ b/oslo.{{cookiecutter.module_name}}/setup.py @@ -18,5 +18,5 @@ import setuptools setuptools.setup( - setup_requires=['pbr>=0.5.21,<1.0'], + setup_requires=['pbr'], pbr=True) diff --git a/{{cookiecutter.repo_name}}/test-requirements.txt b/oslo.{{cookiecutter.module_name}}/test-requirements.txt similarity index 100% rename from {{cookiecutter.repo_name}}/test-requirements.txt rename to oslo.{{cookiecutter.module_name}}/test-requirements.txt diff --git a/{{cookiecutter.repo_name}}/tox.ini b/oslo.{{cookiecutter.module_name}}/tox.ini similarity index 100% rename from {{cookiecutter.repo_name}}/tox.ini rename to oslo.{{cookiecutter.module_name}}/tox.ini diff --git a/{{cookiecutter.repo_name}}/.gitreview b/{{cookiecutter.repo_name}}/.gitreview deleted file mode 100644 index 5426828..0000000 --- a/{{cookiecutter.repo_name}}/.gitreview +++ /dev/null @@ -1,4 +0,0 @@ -[gerrit] -host=review.openstack.org -port=29418 -project={{cookiecutter.repo_group}}/{{cookiecutter.repo_name}}.git diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst deleted file mode 100644 index 2423882..0000000 --- a/{{cookiecutter.repo_name}}/README.rst +++ /dev/null @@ -1,13 +0,0 @@ -=============================== -{{ cookiecutter.repo_name }} -=============================== - -{{ cookiecutter.project_short_description}} - -* Free software: Apache license -* Documentation: http://docs.openstack.org/developer/{{ cookiecutter.repo_name }} - -Features --------- - -* TODO diff --git a/{{cookiecutter.repo_name}}/openstack-common.conf b/{{cookiecutter.repo_name}}/openstack-common.conf deleted file mode 100644 index ee49d6e..0000000 --- a/{{cookiecutter.repo_name}}/openstack-common.conf +++ /dev/null @@ -1,7 +0,0 @@ -[DEFAULT] - -# The list of modules to copy from oslo-incubator.git -module=install_venv_common - -# The base module to hold the copy of openstack.common -base={{cookiecutter.module_name}} diff --git a/{{cookiecutter.repo_name}}/requirements.txt b/{{cookiecutter.repo_name}}/requirements.txt deleted file mode 100644 index 4812c69..0000000 --- a/{{cookiecutter.repo_name}}/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pbr>=0.5.21,<1.0 -Babel>=0.9.6 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/__init__.py b/{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/__init__.py deleted file mode 100644 index 5988b44..0000000 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -# 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 pbr.version - - -__version__ = pbr.version.VersionInfo( - '{{cookiecutter.module_name}}').version_string()