summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-03-17 23:27:50 -0700
committerMonty Taylor <mordred@inaugust.com>2013-03-17 23:27:50 -0700
commite8af43a31805e933391f93954256c9c15f188407 (patch)
tree57f09999e884b01f0d2d8d278312455d5a2c2f97
parenteaef2c9be50b09708b86466822e5275fe154edbf (diff)
downloadpbr-e8af43a31805e933391f93954256c9c15f188407.tar.gz
Rename back to PBR.
Change-Id: I13ee7fab7858231b0fa17f9116176a09184e8b0e
-rw-r--r--.gitreview2
-rw-r--r--README.rst17
-rw-r--r--doc/source/conf.py2
-rw-r--r--doc/source/index.rst9
-rw-r--r--oslo/__init__.py16
-rw-r--r--pbr/__init__.py (renamed from oslo/packaging/__init__.py)0
-rw-r--r--pbr/hooks.py (renamed from oslo/packaging/hooks.py)8
-rw-r--r--pbr/packaging.py (renamed from oslo/packaging/packaging.py)8
-rw-r--r--pbr/tests/__init__.py (renamed from oslo/packaging/tests/__init__.py)0
-rw-r--r--pbr/tests/test_setup.py (renamed from oslo/packaging/tests/test_setup.py)10
-rw-r--r--pbr/tests/utils.py (renamed from oslo/packaging/tests/utils.py)2
-rw-r--r--setup.cfg10
-rw-r--r--test-requirements.txt3
-rw-r--r--tox.ini7
14 files changed, 39 insertions, 55 deletions
diff --git a/.gitreview b/.gitreview
index 9673b81..8df2996 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
-project=openstack/oslo.packaging.git
+project=openstack-dev/pbr.git
diff --git a/README.rst b/README.rst
index a06866d..8a2eb62 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
Introduction
============
-oslo.packaging provides a set of default python packaging configuration and
+pbr provides a set of default python packaging configuration and
behaviors. It is implemented as a setup hook for d2to1 which allows us to
manipulate the setup.cfg information before it is passed to setup.py.
@@ -23,14 +23,14 @@ into the sphinx config.
Usage
=====
-oslo.packaging requires a distribution to use distribute. Your distribution
+pbr requires a distribution to use distribute. Your distribution
must include a distutils2-like setup.cfg file, and a minimal setup.py script.
-A simple sample can be found in oslo.packaging s own setup.cfg
+A simple sample can be found in pbr s own setup.cfg
(it uses its own machinery to install itself)::
[metadata]
- name = oslo.packaging
+ name = pbr
author = OpenStack Foundation
author-email = openstack-dev@lists.openstack.org
summary = OpenStack's setup automation in a reuable form
@@ -51,10 +51,9 @@ A simple sample can be found in oslo.packaging s own setup.cfg
[files]
packages =
oslo
- oslo.packaging
[hooks]
setup-hooks =
- oslo.packaging.hooks.setup_hook
+ pbr.hooks.setup_hook
The minimal setup.py should look something like this::
@@ -63,12 +62,12 @@ The minimal setup.py should look something like this::
from setuptools import setup
setup(
- setup_requires=['d2to1', 'oslo.packaging'],
+ setup_requires=['d2to1', 'pbr'],
d2to1=True,
)
-Note that it's important to specify `d2to1=True` or else the
-oslo.packaging functionality will not be enabled.
+Note that it's important to specify `d2to1=True` or else the pbr functionality
+will not be enabled.
It should also work fine if additional arguments are passed to `setup()`,
but it should be noted that they will be clobbered by any options in the
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 5fb0c34..385f5e0 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -24,7 +24,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'oslo.packaging'
+project = u'pbr'
copyright = u'2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
diff --git a/doc/source/index.rst b/doc/source/index.rst
index ab6f972..75e69ca 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,8 +1,9 @@
-oslo.packaging
-==============
+pbr - Python Build Reasonableness
+=================================
-An OpenStack library for managing setuptools packaging needs in a consistent
-manner.
+A library for managing setuptools packaging needs in a consistent manner.
+
+PBR is not a library about beer.
Contents
--------
diff --git a/oslo/__init__.py b/oslo/__init__.py
deleted file mode 100644
index 4312ef6..0000000
--- a/oslo/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
-#
-# 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/packaging/__init__.py b/pbr/__init__.py
index f745a13..f745a13 100644
--- a/oslo/packaging/__init__.py
+++ b/pbr/__init__.py
diff --git a/oslo/packaging/hooks.py b/pbr/hooks.py
index 8883413..d1563b3 100644
--- a/oslo/packaging/hooks.py
+++ b/pbr/hooks.py
@@ -18,7 +18,7 @@
import os
import setuptools
-from oslo.packaging import packaging
+from pbr import packaging
def smart_find_packages(package_list):
@@ -42,12 +42,12 @@ def setup_hook(config):
config['global'] = config.get('global', dict())
config['global']['commands'] = config['global'].get('commands', "") + """
-oslo.packaging.packaging.LocalSDist
+pbr.packaging.LocalSDist
"""
if packaging.have_sphinx():
config['global']['commands'] = config['global']['commands'] + """
-oslo.packaging.packaging.LocalBuildDoc
-oslo.packaging.packaging.LocalBuildLatex
+pbr.packaging.LocalBuildDoc
+pbr.packaging.LocalBuildLatex
"""
# TODO: Need to get these two included upstream
diff --git a/oslo/packaging/packaging.py b/pbr/packaging.py
index ea742ca..a4df6ad 100644
--- a/oslo/packaging/packaging.py
+++ b/pbr/packaging.py
@@ -148,7 +148,7 @@ def _get_git_directory():
def write_git_changelog():
"""Write a changelog based on the git changelog."""
- log.info('[oslo.packaging] Writing ChangeLog')
+ log.info('[pbr] Writing ChangeLog')
new_changelog = 'ChangeLog'
git_dir = _get_git_directory()
if not os.getenv('SKIP_WRITE_GIT_CHANGELOG'):
@@ -164,7 +164,7 @@ def write_git_changelog():
def generate_authors():
"""Create AUTHORS file using git commits."""
- log.info('[oslo.packaging] Generating AUTHORS')
+ log.info('[pbr] Generating AUTHORS')
jenkins_email = 'jenkins@review.(openstack|stackforge).org'
old_authors = 'AUTHORS.in'
new_authors = 'AUTHORS'
@@ -223,7 +223,7 @@ try:
builders = ['html', 'man']
def generate_autoindex(self):
- log.info("[oslo.packaging] Autodocumenting from %s"
+ log.info("[pbr] Autodocumenting from %s"
% os.path.abspath(os.curdir))
modules = {}
option_dict = self.distribution.get_option_dict('build_sphinx')
@@ -249,7 +249,7 @@ try:
values = dict(module=module, heading=heading,
underline=underline)
- log.info("[oslo.packaging] Generating %s"
+ log.info("[pbr] Generating %s"
% output_filename)
with open(output_filename, 'w') as output_file:
output_file.write(_rst_template % values)
diff --git a/oslo/packaging/tests/__init__.py b/pbr/tests/__init__.py
index f745a13..f745a13 100644
--- a/oslo/packaging/tests/__init__.py
+++ b/pbr/tests/__init__.py
diff --git a/oslo/packaging/tests/test_setup.py b/pbr/tests/test_setup.py
index 55d35d9..eb74fb2 100644
--- a/oslo/packaging/tests/test_setup.py
+++ b/pbr/tests/test_setup.py
@@ -24,8 +24,8 @@ from tempfile import mkstemp
import fixtures
-from oslo.packaging import packaging
-from oslo.packaging.tests import utils
+from pbr import packaging
+from pbr.tests import utils
class DiveDir(fixtures.Fixture):
@@ -88,8 +88,8 @@ class GitLogsTest(utils.BaseTestCase):
@staticmethod
def _root_dir():
# NOTE(yamahata): get root direcotry of repository
- # __file__ = $ROOT/oslo/packaging/tests/test_setup.py
- # => $ROOT/oslo/packaging/tests/unit => $ROOT/tests => $ROOT
+ # __file__ = $ROOT/pbr/tests/test_setup.py
+ # => $ROOT/pbr/tests/unit => $ROOT/tests => $ROOT
root_dir = os.path.dirname(__file__)
root_dir = os.path.dirname(root_dir)
root_dir = os.path.dirname(root_dir)
@@ -103,7 +103,7 @@ class GitLogsTest(utils.BaseTestCase):
"os.path.exists",
lambda path: os.path.abspath(path) in exist_files))
self.useFixture(fixtures.MonkeyPatch(
- "oslo.packaging.packaging._get_git_directory",
+ "pbr.packaging._get_git_directory",
lambda: os.path.join(os.path.abspath(root_dir), ".git")))
self.useFixture(fixtures.FakePopen(lambda _: {
"stdout": StringIO.StringIO("Author: Foo Bar <email@bar.com>\n")
diff --git a/oslo/packaging/tests/utils.py b/pbr/tests/utils.py
index 977d45f..4c11554 100644
--- a/oslo/packaging/tests/utils.py
+++ b/pbr/tests/utils.py
@@ -35,7 +35,7 @@ class BaseTestCase(testtools.TestCase):
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
self.log_fixture = self.useFixture(
- fixtures.FakeLogger('oslo.packaging'))
+ fixtures.FakeLogger('pbr'))
self.useFixture(fixtures.NestedTempfile())
self.useFixture(fixtures.FakeLogger())
diff --git a/setup.cfg b/setup.cfg
index ae4f243..c34709f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,11 +1,11 @@
[metadata]
-name = oslo.packaging
+name = pbr
author = OpenStack
author-email = openstack-dev@lists.openstack.org
summary = OpenStack's setup automation in a reusable form
description-file =
README.rst
-home-page = http://pypi.python.org/pypi/oslo.packaging
+home-page = http://pypi.python.org/pypi/pbr
classifier =
Development Status :: 4 - Beta
Environment :: Console
@@ -18,10 +18,8 @@ classifier =
[files]
packages =
- oslo
-namespace_packages =
- oslo
+ pbr
[global]
setup-hooks =
- oslo.packaging.hooks.setup_hook
+ pbr.hooks.setup_hook
diff --git a/test-requirements.txt b/test-requirements.txt
index fd06217..9b872d8 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,8 +1,7 @@
coverage>=3.6
discover
fixtures>=0.3.12
-pep8==1.3.3
-pyflakes
+flake8
python-subunit
sphinx>=1.1.2
testrepository>=0.0.13
diff --git a/tox.ini b/tox.ini
index 18e9db3..3d7ff82 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,8 +16,7 @@ sitepackages = True
downloadcache = ~/cache/pip
[testenv:pep8]
-commands =
- pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,*.egg .
+commands = flake8
[testenv:pyflakes]
deps = pyflakes
@@ -30,3 +29,7 @@ commands =
[testenv:venv]
commands = {posargs}
+
+[flake8]
+exclude = .venv,.tox,dist,doc,*.egg
+show-source = true