Update for use with oslo libraries
Oslo libraries are always in the oslo namespace, so they need the namespace package configured. Change-Id: Ib1077622c82cc771c39ab3e9d3ea58d2eb00c94f
This commit is contained in:
parent
12da3a53af
commit
f8753c13f3
17
README.rst
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
|
||||
|
@ -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."
|
||||
}
|
||||
|
4
oslo.{{cookiecutter.module_name}}/.gitreview
Normal file
4
oslo.{{cookiecutter.module_name}}/.gitreview
Normal file
@ -0,0 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=openstack/oslo.{{cookiecutter.module_name}}.git
|
@ -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 }}
|
13
oslo.{{cookiecutter.module_name}}/README.rst
Normal file
13
oslo.{{cookiecutter.module_name}}/README.rst
Normal file
@ -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
|
@ -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
|
15
oslo.{{cookiecutter.module_name}}/oslo/__init__.py
Normal file
15
oslo.{{cookiecutter.module_name}}/oslo/__init__.py
Normal file
@ -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__)
|
1
oslo.{{cookiecutter.module_name}}/requirements.txt
Normal file
1
oslo.{{cookiecutter.module_name}}/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
Babel>=0.9.6
|
@ -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
|
@ -18,5 +18,5 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr>=0.5.21,<1.0'],
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
@ -1,4 +0,0 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project={{cookiecutter.repo_group}}/{{cookiecutter.repo_name}}.git
|
@ -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
|
@ -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}}
|
@ -1,2 +0,0 @@
|
||||
pbr>=0.5.21,<1.0
|
||||
Babel>=0.9.6
|
@ -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…
x
Reference in New Issue
Block a user