summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2014-01-03 11:23:38 -0500
committerDonald Stufft <donald@stufft.io>2014-01-03 11:42:56 -0500
commita66681bf4d4e74103e941dd265886df2e79817f9 (patch)
tree52c47d58b1828efe686d911028fdeaf718907ec1
parent7964073cc7a0a27e07d34dfe95b467e12fc50348 (diff)
downloadpython-barbicanclient-a66681bf4d4e74103e941dd265886df2e79817f9.tar.gz
Migrate to pbr
Change-Id: Id914183a5098e2fdc3f325fc83ecc5161886733d
-rw-r--r--.gitignore4
-rw-r--r--barbicanclient/version.py6
-rw-r--r--requirements.txt (renamed from tools/pip-requires)2
-rw-r--r--setup.cfg30
-rw-r--r--setup.py61
-rw-r--r--test-requirements.txt (renamed from tools/test-requires)0
-rw-r--r--tox.ini4
7 files changed, 44 insertions, 63 deletions
diff --git a/.gitignore b/.gitignore
index db9daae..156039c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,3 +48,7 @@ flake8.log
# OSX metadata
.DS_Store
+
+# PBR
+AUTHORS
+ChangeLog
diff --git a/barbicanclient/version.py b/barbicanclient/version.py
index fac707f..886a67b 100644
--- a/barbicanclient/version.py
+++ b/barbicanclient/version.py
@@ -17,5 +17,7 @@
Cloudkeep's Barbican Client version
"""
-__version__ = '1.0.0'
-__version_info__ = tuple(__version__.split('.'))
+import pbr.version
+
+version_info = pbr.version.VersionInfo("barbicanclient")
+__version__ = version_info.version_string()
diff --git a/tools/pip-requires b/requirements.txt
index 3b29530..adae5c8 100644
--- a/tools/pip-requires
+++ b/requirements.txt
@@ -1,3 +1,5 @@
+pbr>=0.5.21,<1.0
+
argparse>=1.2.1
eventlet>=0.13.0
requests>=1.2.3
diff --git a/setup.cfg b/setup.cfg
index 40fddba..37e1a51 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,7 +1,35 @@
+[metadata]
+name = python-barbicanclient
+version = 2014.1
+description = Client Library for OpenStack Barbican Key Management API
+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 =
+ barbicanclient
+
+[entry_points]
+console_scripts =
+ barbican = barbicanclient.barbican:main
+
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
-upload-dir = doc/build/html \ No newline at end of file
+upload-dir = doc/build/html
diff --git a/setup.py b/setup.py
index 5e4fe76..c4ded8a 100644
--- a/setup.py
+++ b/setup.py
@@ -15,65 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
-
-name = 'python-barbicanclient'
-
-
-def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
-
-def get_version():
- PKG = "barbicanclient"
- 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.
- return version
-
setuptools.setup(
- name=name,
- version=get_version(),
- description='Client Library for OpenStack Barbican Key Management API',
- long_description=read('README.md'),
- keywords="openstack encryption key-management secret",
- url='https://github.com/cloudkeep/barbican',
- license='Apache License (2.0)',
- author='Rackspace, Inc.',
- author_email='openstack-dev@lists.openstack.org',
- packages=setuptools.find_packages(
- exclude=['tests', 'tests.*', 'examples', 'examples.*']
- ),
- install_requires=[
- 'argparse>=1.2.1',
- 'eventlet>=0.13.0',
- 'requests>=1.2.3',
- 'python-keystoneclient>=0.3.2',
- ],
- test_suite='nose.collector',
- tests_require=['nose'],
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Console',
- 'Environment :: OpenStack',
- 'Intended Audience :: Developers',
- 'Intended Audience :: Information Technology',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.7',
- 'Environment :: No Input/Output (Daemon)',
- ],
- entry_points={
- "console_scripts": [
- "barbican = barbicanclient.barbican:main",
- ],
- },
+ setup_requires=['pbr'],
+ pbr=True,
)
diff --git a/tools/test-requires b/test-requirements.txt
index 3c5872c..3c5872c 100644
--- a/tools/test-requires
+++ b/test-requirements.txt
diff --git a/tox.ini b/tox.ini
index 2f35b9a..bafb2be 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,8 +14,8 @@ setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_NOCAPTURE=False
OS_STDERR_NOCAPTURE=False
-deps = -r{toxinidir}/tools/pip-requires
- -r{toxinidir}/tools/test-requires
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
[testenv:pep8]
commands = {toxinidir}/tools/hacking.sh