Browse Source

Update for use with oslo libraries

Oslo libraries are always in the oslo namespace, so they
need the namespace package configured.

Change-Id: Ib1077622c82cc771c39ab3e9d3ea58d2eb00c94f
changes/83/74383/1
Doug Hellmann 9 years ago
parent
commit
f8753c13f3
  1. 17
      README.rst
  2. 5
      cookiecutter.json
  3. 0
      oslo.{{cookiecutter.module_name}}/.coveragerc
  4. 0
      oslo.{{cookiecutter.module_name}}/.gitignore
  5. 4
      oslo.{{cookiecutter.module_name}}/.gitreview
  6. 0
      oslo.{{cookiecutter.module_name}}/.mailmap
  7. 0
      oslo.{{cookiecutter.module_name}}/.testr.conf
  8. 2
      oslo.{{cookiecutter.module_name}}/CONTRIBUTING.rst
  9. 0
      oslo.{{cookiecutter.module_name}}/HACKING.rst
  10. 0
      oslo.{{cookiecutter.module_name}}/LICENSE
  11. 0
      oslo.{{cookiecutter.module_name}}/MANIFEST.in
  12. 13
      oslo.{{cookiecutter.module_name}}/README.rst
  13. 0
      oslo.{{cookiecutter.module_name}}/babel.cfg
  14. 4
      oslo.{{cookiecutter.module_name}}/doc/source/conf.py
  15. 0
      oslo.{{cookiecutter.module_name}}/doc/source/contributing.rst
  16. 0
      oslo.{{cookiecutter.module_name}}/doc/source/index.rst
  17. 0
      oslo.{{cookiecutter.module_name}}/doc/source/installation.rst
  18. 0
      oslo.{{cookiecutter.module_name}}/doc/source/readme.rst
  19. 0
      oslo.{{cookiecutter.module_name}}/doc/source/usage.rst
  20. 15
      oslo.{{cookiecutter.module_name}}/oslo/__init__.py
  21. 0
      oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/__init__.py
  22. 0
      oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/__init__.py
  23. 0
      oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/base.py
  24. 0
      oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py
  25. 1
      oslo.{{cookiecutter.module_name}}/requirements.txt
  26. 19
      oslo.{{cookiecutter.module_name}}/setup.cfg
  27. 2
      oslo.{{cookiecutter.module_name}}/setup.py
  28. 0
      oslo.{{cookiecutter.module_name}}/test-requirements.txt
  29. 0
      oslo.{{cookiecutter.module_name}}/tox.ini
  30. 4
      {{cookiecutter.repo_name}}/.gitreview
  31. 13
      {{cookiecutter.repo_name}}/README.rst
  32. 7
      {{cookiecutter.repo_name}}/openstack-common.conf
  33. 2
      {{cookiecutter.repo_name}}/requirements.txt
  34. 19
      {{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/__init__.py

17
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

5
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."
}

0
{{cookiecutter.repo_name}}/.coveragerc → oslo.{{cookiecutter.module_name}}/.coveragerc

0
{{cookiecutter.repo_name}}/.gitignore → oslo.{{cookiecutter.module_name}}/.gitignore vendored

4
oslo.{{cookiecutter.module_name}}/.gitreview

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

0
{{cookiecutter.repo_name}}/.mailmap → oslo.{{cookiecutter.module_name}}/.mailmap

0
{{cookiecutter.repo_name}}/.testr.conf → oslo.{{cookiecutter.module_name}}/.testr.conf

2
{{cookiecutter.repo_name}}/CONTRIBUTING.rst → 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 }}

0
{{cookiecutter.repo_name}}/HACKING.rst → oslo.{{cookiecutter.module_name}}/HACKING.rst

0
{{cookiecutter.repo_name}}/LICENSE → oslo.{{cookiecutter.module_name}}/LICENSE

0
{{cookiecutter.repo_name}}/MANIFEST.in → oslo.{{cookiecutter.module_name}}/MANIFEST.in

13
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

0
{{cookiecutter.repo_name}}/babel.cfg → oslo.{{cookiecutter.module_name}}/babel.cfg

4
{{cookiecutter.repo_name}}/doc/source/conf.py → 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

0
{{cookiecutter.repo_name}}/doc/source/contributing.rst → oslo.{{cookiecutter.module_name}}/doc/source/contributing.rst

0
{{cookiecutter.repo_name}}/doc/source/index.rst → oslo.{{cookiecutter.module_name}}/doc/source/index.rst

0
{{cookiecutter.repo_name}}/doc/source/installation.rst → oslo.{{cookiecutter.module_name}}/doc/source/installation.rst

0
{{cookiecutter.repo_name}}/doc/source/readme.rst → oslo.{{cookiecutter.module_name}}/doc/source/readme.rst

0
{{cookiecutter.repo_name}}/doc/source/usage.rst → oslo.{{cookiecutter.module_name}}/doc/source/usage.rst

15
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__)

0
oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/__init__.py

0
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/__init__.py → oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/__init__.py

0
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/base.py → oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/base.py

0
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py → oslo.{{cookiecutter.module_name}}/oslo/{{cookiecutter.module_name}}/tests/test_{{cookiecutter.module_name}}.py

1
oslo.{{cookiecutter.module_name}}/requirements.txt

@ -0,0 +1 @@
Babel>=0.9.6

19
{{cookiecutter.repo_name}}/setup.cfg → 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

2
{{cookiecutter.repo_name}}/setup.py → 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)

0
{{cookiecutter.repo_name}}/test-requirements.txt → oslo.{{cookiecutter.module_name}}/test-requirements.txt

0
{{cookiecutter.repo_name}}/tox.ini → oslo.{{cookiecutter.module_name}}/tox.ini

4
{{cookiecutter.repo_name}}/.gitreview

@ -1,4 +0,0 @@
[gerrit]
host=review.openstack.org
port=29418
project={{cookiecutter.repo_group}}/{{cookiecutter.repo_name}}.git

13
{{cookiecutter.repo_name}}/README.rst

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

7
{{cookiecutter.repo_name}}/openstack-common.conf

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

2
{{cookiecutter.repo_name}}/requirements.txt

@ -1,2 +0,0 @@
pbr>=0.5.21,<1.0
Babel>=0.9.6

19
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/__init__.py

@ -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()
Loading…
Cancel
Save