From 4a93294bb02502cf623152f073cac8aacc9b3f2b Mon Sep 17 00:00:00 2001 From: Dmitry Teselkin Date: Wed, 7 Oct 2015 14:49:42 +0300 Subject: [PATCH] Ensure fuel-client spec compatibility with CentOS 7 Update RPM spec to be compatible with OpenStack Liberty dependencies Includes 'Allign requirements to Liberty' In order to work properly in the same environment with Liberty release of OpenStack, Fuel Client must follow Global Requirements not only by version but also by order. Closes-bug: #1499659 Blueprint: master-on-centos7 Is NOT compatible with CentOS6 master node Co-Authored-By: Dmitry Teselkin Change-Id: Id015f22ea931e1a1e4f5dd7d6058489ba21a0808 --- requirements.txt | 23 +++++++++---------- setup.py | 25 +++++++++++---------- specs/python-fuelclient.spec | 43 +++++++++++++----------------------- test-requirements.txt | 13 ++++++----- 4 files changed, 46 insertions(+), 58 deletions(-) diff --git a/requirements.txt b/requirements.txt index c534a13a..9326c275 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,10 @@ -argparse==1.2.1 -# NOTE(prmtl): Bug https://bugs.launchpad.net/fuel/+bug/1481212 -stevedore<1.4.0 -cliff>=1.7.0,<=1.9.0 -pbr>=0.6,!=0.7,<1.0 -oslo.i18n>=1.3.0,<1.6.0 -oslo.serialization>=1.0.0,<1.5.0 -oslo.utils<1.4.1 -oslo.config<1.10.0 -python-keystoneclient>=0.10.0,<1.4.0 -PyYAML>=3.1.0,<=3.10 -requests>=2.1.0,!=2.4.0,<=2.2.1 -six>=1.7.0,<=1.9.0 +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +argparse +cliff>=1.14.0 # Apache-2.0 +pbr>=1.6 +python-keystoneclient>=1.6.0 +PyYAML>=3.1.0 +requests!=2.8.0,>=2.5.2 +six>=1.9.0 diff --git a/setup.py b/setup.py index f97e6bc5..782bb21f 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,21 @@ -# Copyright 2013-2014 Mirantis, Inc. +# 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 +# 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, 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. +# 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. +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools - # 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 @@ -24,5 +25,5 @@ except ImportError: pass setuptools.setup( - setup_requires=['pbr'], + setup_requires=['pbr>=1.8'], pbr=True) diff --git a/specs/python-fuelclient.spec b/specs/python-fuelclient.spec index e2266add..9421ca5c 100644 --- a/specs/python-fuelclient.spec +++ b/specs/python-fuelclient.spec @@ -1,4 +1,4 @@ -%if 0%{?rhel} && 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 7 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} @@ -21,38 +21,21 @@ Prefix: %{_prefix} BuildArch: noarch BuildRequires: python-setuptools -BuildRequires: python-pbr > 0.7 -BuildRequires: python-pbr < 1.0 +BuildRequires: python-pbr >= 1.8.0 -Requires: python >= 2.6 -Requires: python <= 2.7 +%if 0%{!?rhel:0} == 6 +Requires: python-argparse +%endif -Requires: python-argparse == 1.2.1 +Conflicts: python-requests == 2.8.0 +Requires: python-cliff >= 1.14.0 +Requires: python-pbr >= 1.6 +Requires: python-keystoneclient >= 1.6.0 Requires: PyYAML >= 3.1.0 -Requires: PyYAML <= 3.10 +Requires: python-requests >= 2.5.2 +Requires: python-six >= 1.9.0 -Requires: python-requests >= 2.1.0 -Requires: python-requests <= 2.2.1 - -Requires: python-keystoneclient >= 1:0.10.0 -Requires: python-keystoneclient < 1:1.4.0 - -Requires: python-cliff >= 1.7.0 -Requires: python-cliff <= 1.9.0 - -Requires: python-six >= 1.7.0 -Requires: python-six <= 1.9.0 - -Requires: python-oslo-serialization >= 1.0.0 -Requires: python-oslo-serialization < 1.5.0 - -Requires: python-oslo-i18n >= 1.3.0 -Requires: python-oslo-i18n < 1.6.0 - -Requires: python-oslo-utils < 1:1.5.0 - -Requires: python-oslo-config < 1:1.10.0 %description Summary: Console utility for working with fuel rest api @@ -75,3 +58,7 @@ rm -rf $RPM_BUILD_ROOT %{python2_sitelib}/* %{_bindir}/* %doc fuelclient/fuel_client.yaml + +%changelog +* Thu Nov 19 2015 Aleksandr Mogylchenko 8.0.0-1 +- make spec compatible with CentOS 7 diff --git a/test-requirements.txt b/test-requirements.txt index c2fb6fc2..5fde9b03 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,10 +1,13 @@ -fixtures>=0.3.14,<1.3.0 -hacking>=0.10.0,<0.11 -mock>=1.0 -oslotest>=1.5.1,<1.6.0 # Apache-2.0 +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +fixtures>=1.3.1 +hacking<0.11,>=0.10.2 +mock>=1.2 +oslotest>=1.10.0 # Apache-2.0 requests-mock>=0.6.0 # Apache-2.0 testrepository>=0.0.18 -testtools>=0.9.36,!=1.2.0 +testtools>=1.4.0 # Files beyond this line are not in Global Requirements list # and must be added there.