Migrate to pbr
OpenStack uses pbr for setuptools/build and version releases. As barbican looks towards incubation, migrate to being pbr based. Change-Id: I3c7a389596ca579a5613ea98b21cdc6967e49cc7
This commit is contained in:
parent
faffd3512d
commit
8f1c652862
2
.gitignore
vendored
2
.gitignore
vendored
@ -51,3 +51,5 @@ versiononly.txt
|
||||
*.orig
|
||||
myapp.profile
|
||||
*.out.myapp
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
|
@ -13,14 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Cloudkeep's Barbican version.
|
||||
import pbr.version
|
||||
|
||||
The code repository should only control major and minor version information in
|
||||
this file. Per-build information will be supplied at build time via the
|
||||
'build_id' and 'commit_id' parameters.
|
||||
"""
|
||||
|
||||
__version__ = '2013.2.{build_id}'
|
||||
__version_info__ = tuple(__version__.split('.'))
|
||||
__version_commit__ = '{commit_id}'
|
||||
version_info = pbr.version.VersionInfo('barbican')
|
||||
__version__ = version_info.version_string()
|
||||
|
@ -49,8 +49,8 @@ install_barbican()
|
||||
fi
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -r tools/pip-requires
|
||||
pip install -r tools/test-requires
|
||||
pip install -r requirements.txt
|
||||
pip install -r test-requirements.txt
|
||||
|
||||
# Install uWSGI
|
||||
pip install uwsgi
|
||||
|
@ -1,3 +1,5 @@
|
||||
pbr>=0.5.21,<1.0
|
||||
|
||||
falcon>=0.1.1
|
||||
wsgiref>=0.1.2
|
||||
pysqlite>=2.6.0
|
34
setup.cfg
34
setup.cfg
@ -1,3 +1,37 @@
|
||||
[metadata]
|
||||
name = barbican
|
||||
version = 2014.1
|
||||
description = Service for storing sensitive client information for OpenStack
|
||||
description-file =
|
||||
README.md
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://www.openstack.org/
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 2.6
|
||||
|
||||
[files]
|
||||
packages =
|
||||
barbican
|
||||
scripts =
|
||||
bin/barbican.sh
|
||||
bin/barbican-worker.py
|
||||
|
||||
[entry_points]
|
||||
barbican.crypto.plugin =
|
||||
p11_crypto = barbican.crypto.p11_crypto:P11CryptoPlugin
|
||||
simple_crypto = barbican.crypto.plugin:SimpleCryptoPlugin
|
||||
barbican.test.crypto.plugin =
|
||||
test_crypto = barbican.tests.crypto.test_plugin:TestCryptoPlugin
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
build-dir = doc/build
|
||||
|
78
setup.py
78
setup.py
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
# Copyright (c) 2010 OpenStack, LLC.
|
||||
#!/usr/bin/env python
|
||||
# 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
|
||||
# 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,
|
||||
@ -14,71 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
try:
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools.command.sdist import sdist
|
||||
except ImportError:
|
||||
from ez_setup import use_setuptools
|
||||
use_setuptools()
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools.command.sdist import sdist
|
||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
||||
import setuptools
|
||||
|
||||
# Determine version of this application.
|
||||
# TBD: Revisit version flows and processing once integrating with OpenStack,
|
||||
# see glance setup.py
|
||||
PKG = "barbican"
|
||||
VERSIONFILE = os.path.join(PKG, "version.py")
|
||||
version = "unknown"
|
||||
try:
|
||||
version_file = open(VERSIONFILE, "r")
|
||||
for line in version_file:
|
||||
if '__version__' in line:
|
||||
version = line.split("'")[1]
|
||||
break
|
||||
except EnvironmentError:
|
||||
pass # Okay, there is no version file.
|
||||
|
||||
|
||||
class local_sdist(sdist):
|
||||
"""Customized sdist hook - builds the ChangeLog file from VC first"""
|
||||
|
||||
def run(self):
|
||||
sdist.run(self)
|
||||
|
||||
cmdclass = {'sdist': local_sdist}
|
||||
|
||||
# TDB: Revisit sphinx documentation needs once move to OpenStack...
|
||||
# see barbican setup.py
|
||||
|
||||
setup(
|
||||
name='barbican',
|
||||
version=version,
|
||||
description='The Barbican project provides a service for storing '
|
||||
'sensitive client information such as encryption keys',
|
||||
license='Apache License (2.0)',
|
||||
author='OpenStack',
|
||||
author_email='john.wood@rackspace.com',
|
||||
url='http://barbican.openstack.org/',
|
||||
packages=find_packages(exclude=['bin']),
|
||||
test_suite='nose.collector',
|
||||
cmdclass=cmdclass,
|
||||
include_package_data=True,
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Environment :: No Input/Output (Daemon)',
|
||||
],
|
||||
scripts=['bin/barbican.sh', 'bin/barbican-worker.py'],
|
||||
py_modules=[],
|
||||
entry_points="""
|
||||
[barbican.crypto.plugin]
|
||||
p11_crypto = barbican.crypto.p11_crypto:P11CryptoPlugin
|
||||
simple_crypto = barbican.crypto.plugin:SimpleCryptoPlugin
|
||||
|
||||
[barbican.test.crypto.plugin]
|
||||
test_crypto = barbican.tests.crypto.test_plugin:TestCryptoPlugin
|
||||
"""
|
||||
)
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
|
@ -1,7 +1,4 @@
|
||||
hacking
|
||||
hacking>=0.5.6,<0.8
|
||||
mock>=1.0.0
|
||||
nose
|
||||
nosexcover
|
||||
testtools
|
||||
tox
|
||||
|
@ -51,8 +51,8 @@ def print_help():
|
||||
def main(argv):
|
||||
root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||
venv = os.path.join(root, '.venv')
|
||||
pip_requires = os.path.join(root, 'tools', 'pip-requires')
|
||||
test_requires = os.path.join(root, 'tools', 'test-requires')
|
||||
pip_requires = os.path.join(root, 'requirements.txt')
|
||||
test_requires = os.path.join(root, 'test-requirements.txt')
|
||||
py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
project = 'Barbican'
|
||||
project_name = "barbican.pth"
|
||||
|
17
tox.ini
17
tox.ini
@ -5,16 +5,11 @@ envlist = pep8,pyflakes,py27
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
PYTHONPATH = {toxinidir}/etc/barbican
|
||||
deps = -r{toxinidir}/tools/pip-requires
|
||||
-r{toxinidir}/tools/test-requires
|
||||
|
||||
[testenv:pyflakes]
|
||||
deps = pyflakes
|
||||
commands = pyflakes barbican setup.py
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:pep8]
|
||||
deps = pep8
|
||||
commands = pep8 barbican --ignore=E711 --count --repeat --show-source --exclude=.tox setup.py
|
||||
commands = flake8
|
||||
|
||||
[testenv:py27]
|
||||
commands = nosetests {posargs:--with-xcoverage --all-modules --cover-inclusive --traverse-namespace --with-xunit --cover-package=barbican}
|
||||
@ -22,8 +17,8 @@ commands = nosetests {posargs:--with-xcoverage --all-modules --cover-inclusive -
|
||||
[testenv:coverage]
|
||||
commands = coverage html {posargs:--include="*barbican*"}
|
||||
|
||||
[testenv:hacking]
|
||||
commands = {toxinidir}/tools/hacking.sh
|
||||
|
||||
[flake8]
|
||||
# E711 ignored because of sqlalchemy override of == None
|
||||
# H ignored because it's not H clean
|
||||
ignore = E711,H
|
||||
exclude = .git,.idea,.tox,bin,dist,debian,rpmbuild,tools,*.egg-info,*openstack/common
|
||||
|
Loading…
Reference in New Issue
Block a user