Move setup.py to pbr usage
Closes-Bug: #1528450 Change-Id: I458d5d9697f783e9278bca36bfe7b9252078ffc0
This commit is contained in:
parent
74f12a7033
commit
d802a9f68a
20
fuel_health/hooks.py
Normal file
20
fuel_health/hooks.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright 2015 Mirantis, Inc.
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
def setup_hook(config):
|
||||
import pbr.packaging
|
||||
|
||||
# this monkey patch is to avoid appending git version to version
|
||||
pbr.packaging._get_version_from_git = lambda pre_version: pre_version
|
@ -11,6 +11,7 @@ python-glanceclient>=0.18.0
|
||||
python-saharaclient>=0.10.0
|
||||
|
||||
paramiko>=1.13.0
|
||||
pbr>=1.6
|
||||
requests>=2.5.2,!=2.8.0
|
||||
unittest2
|
||||
PyYAML>=3.1.0
|
||||
|
39
setup.cfg
Normal file
39
setup.cfg
Normal file
@ -0,0 +1,39 @@
|
||||
[metadata]
|
||||
name = fuel-ostf
|
||||
version = 9.0.0
|
||||
summary = Library for cloud computing testing
|
||||
author = Mirantis Inc.
|
||||
author-email = product@mirantis.com
|
||||
home-page = https://launchpad.net/fuel
|
||||
license = Apache License, Version 2.0
|
||||
classifier =
|
||||
Development Status :: 3 - Alpha
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology,
|
||||
Intended Audience :: System Administrator',
|
||||
License :: OSI Approved :: Apache Software License,
|
||||
Operating System :: POSIX :: Linux,
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2.7
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
fuel_health.hooks.setup_hook
|
||||
|
||||
[files]
|
||||
packages =
|
||||
fuel_plugin
|
||||
fuel_health
|
||||
|
||||
[entry_points]
|
||||
plugins=
|
||||
nose = fuel_plugin.ostf_adapter.nose_plugin.nose_adapter:NoseDriver
|
||||
console_scripts =
|
||||
ostf-server = fuel_plugin.ostf_adapter.server:main
|
||||
|
||||
[compile_catalog]
|
||||
domain = fuel-ostf
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
56
setup.py
56
setup.py
@ -12,55 +12,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
import setuptools
|
||||
|
||||
|
||||
def requirements():
|
||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||
requirements = []
|
||||
with open('{0}/requirements.txt'.format(dir_path), 'r') as reqs:
|
||||
requirements = reqs.readlines()
|
||||
return requirements
|
||||
|
||||
# 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
|
||||
|
||||
setuptools.setup(
|
||||
|
||||
name='fuel-ostf',
|
||||
version='9.0.0',
|
||||
|
||||
description='cloud computing testing',
|
||||
|
||||
zip_safe=False,
|
||||
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
'Framework :: Setuptools Plugin',
|
||||
'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',
|
||||
'Topic :: System :: Testing',
|
||||
],
|
||||
|
||||
include_package_data=True,
|
||||
|
||||
packages=setuptools.find_packages(),
|
||||
|
||||
install_requires=requirements(),
|
||||
|
||||
entry_points={
|
||||
'plugins': [
|
||||
('nose = fuel_plugin.ostf_adapter.'
|
||||
'nose_plugin.nose_adapter:NoseDriver')
|
||||
],
|
||||
'console_scripts': [
|
||||
'ostf-server = fuel_plugin.ostf_adapter.server:main',
|
||||
]
|
||||
},
|
||||
|
||||
setup_requires=['pbr'],
|
||||
pbr=True,
|
||||
)
|
||||
|
@ -13,6 +13,7 @@ Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-pbr >= 1.6
|
||||
BuildArch: noarch
|
||||
|
||||
# fuel_health_reqs
|
||||
@ -32,6 +33,7 @@ Requires: python-saharaclient >= 0.6
|
||||
Requires: python-swiftclient >= 2.3.1
|
||||
Requires: python-glanceclient >= 0.14.1
|
||||
Requires: python-paramiko >= 1.10.1
|
||||
Requires: python-pbr >= 1.6
|
||||
Requires: python-requests >= 1.1
|
||||
Requires: python-unittest2 >= 0.5.1
|
||||
Requires: PyYAML >= 3.10
|
||||
|
Loading…
Reference in New Issue
Block a user