RM8043 Move to using PBR

Signed-off-by: Philip Schwartz <philip.schwartz@rackspace.com>
This commit is contained in:
Philip Schwartz 2014-07-31 12:06:30 -04:00
parent 5031ae03e0
commit cde3a072a7
3 changed files with 55 additions and 63 deletions

View File

@ -1,3 +1,4 @@
pbr>=0.6,!=0.7,<1.0
cliff
PyYAML
six

28
setup.cfg Normal file
View File

@ -0,0 +1,28 @@
[metadata]
name = striker
summary = Rackspace Task Runner
description-file =
README.rst
author = Rackspace Hosting
author-email = striker-dev@rackspace.com
home-page = http://rackspace.com
Development Status :: 5 Alpha
Environment :: Development
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
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
[files]
packages =
striker
[wheel]
universal = 1

View File

@ -1,65 +1,28 @@
import os
import sys
#!/usr/bin/env python
# Copyright 2014 Rackspace
# All Rights Reserved.
#
# 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 setuptools
from setuptools import setup, find_packages
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
# Utility function to read the README fule
def readfile(filename):
with open(filename) as f:
return f.read()
# Utility function to read the requirement file
def readreq(filename):
result = []
with open(filename) as f:
for eachreq in f:
eachreq = eachreq.strip()
if (eachreq.startswith('-e') or eachreq.startswith('http')
or eachreq.startswith('git')):
index = eachreq.find('#egg=')
if index >= 0:
eachreq = eachreq[index + 5:].partition('#')[0].strip()
else:
eachreq = eachreq.partition('#')[0].strip()
# Check if any requirement file is specified
elif eachreq.startswith('-r'):
eachreq = eachreq[2:].partition(' ')[2].strip()
result = result + readreq(eachreq)
continue
# If requirement is empty
elif not eachreq:
continue
result.append(eachreq)
return result
# The setup script
setup(
name='striker',
version='0.1.0',
author='Kevin L. Mitchell',
author_email='kevin.mitchell@rackspace.com',
url='https://github.rackspace.com/O3Eng-infra/striker',
description='Job management software',
long_description=readfile('README.rst'),
entry_points={
'console_scripts': [
'striker = striker.bootstrap_setup:bootstrap.console',
],
'striker.accounts': [
'literal = striker.account:AccountLiteral',
'env = striker.account:AccountEnvironment',
],
'striker.artifactstores': [
'ssh = striker.artifactstore:SSHStore',
'http = striker.artifactstore:HTTPStore',
'cloudfiles = striker.artifactstore:CloudFilesStore',
],
},
packages=find_packages(exclude=['tests', 'tests.*']),
install_requires=readreq('requirements.txt'),
tests_require=readreq('test-requirements.txt'),
)
setuptools.setup(
setup_requires=['pbr'],
pbr=True)