python-pbr/python-pbr.spec
Matej Cepl 12cf5f81ed Accepting request 857014 from home:bnavigator:branches:devel:languages:python
- Update to 5.5.1
  * Run tempest-full for stable/train
  * Remove use_2to3 backward compat for Setuptools
  * More easy_install.ScriptWriter.get_header()
- Changes for 5.5.0
  * Remove bdist_wininst support
  * Increase integration test timeout
  * Add Release Notes to documentation
  * Cleanup old legacy devstack-gate jobs
  * Begin work to modernize pbr’s integration testing
  * Re-add ChangeLog
  * Update some url to use opendev.org
  * Support newer openstackdocstheme
  * Use easy_install.ScriptWriter.get_header()
  * Remove neutron-fwaas from the jobs’ required project
  * Update python requires packaging metadata for package
  * trivial: Improve logging of run commands
  + Map requires-python to python-requires
  * Update hacking
  * Add support for virtualenv 20.x
- Only test the primary python3 interpreter because some test
  dependencies from OpenStack (which are not hard required by the
  package itself) only provide that one.
  gh#openSUSE/python-rpm-macros#66
- Add remove_mock.patch 
 
 https://review.opendev.org/c/openstack/pbr/+/767972

OBS-URL: https://build.opensuse.org/request/show/857014
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pbr?expand=0&rev=133
2020-12-19 20:52:30 +00:00

113 lines
3.5 KiB
RPMSpec

#
# spec file for package python-pbr
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-pbr%{psuffix}
Version: 5.5.1
Release: 0
Summary: Python Build Reasonableness
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/pbr/latest/
Source: https://files.pythonhosted.org/packages/source/p/pbr/pbr-%{version}.tar.gz
# PATCH-FIX-UPSTREAM remove_mock.patch -- https://review.opendev.org/c/openstack/pbr/+/767972 remove explicit mock
Patch0: remove_mock.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
Recommends: git-core
Suggests: python-nose
Requires(post): update-alternatives
Requires(postun): update-alternatives
Obsoletes: python-pbr-doc
BuildArch: noarch
%if %{with test}
BuildRequires: git-core
BuildRequires: gpg2
# Package originates from OpenStack and depends on other OpenStack packages for testing.
# These are only available for the primary python3 interpreter in TW, but optional.
# --> Only test in default python3 flavor. gh#openSUSE/python-rpm-macros#66
# Python 2 packages on Leap are too outdated to test, either (stestr, subunit).
BuildRequires: python3-Sphinx
BuildRequires: python3-devel
BuildRequires: python3-fixtures >= 3.0.0
BuildRequires: python3-six >= 1.12.0
BuildRequires: python3-stestr >= 2.1.0
BuildRequires: python3-testrepository >= 0.0.18
BuildRequires: python3-testresources >= 2.0.0
BuildRequires: python3-testscenarios >= 0.4
BuildRequires: python3-testtools >= 2.2.0
BuildRequires: python3-virtualenv >= 20.0.3
BuildRequires: python3-wheel >= 0.32.0
%endif
%python_subpackages
%description
PBR is a library to automatically do a bunch of standard
things you want in your setup.py without you having to repeat
them every time. It will set versions, process requirements
files and generate AUTHORS and ChangeLog file all from git
information.
%prep
%autosetup -p1 -n pbr-%{version}
sed -i '/coverage/d;/hacking/d' test-requirements.txt
%build
%python_build
%if %{with test}
%check
export OS_TEST_TIMEOUT=60
python3 -m stestr run --suppress-attachments
%endif
%if !%{with test}
%install
%python_install
%python_expand rm -r %{buildroot}%{$python_sitelib}/pbr/tests
%python_clone -a %{buildroot}%{_bindir}/pbr
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative pbr
%postun
%python_uninstall_alternative pbr
%files %{python_files}
%license LICENSE
%doc AUTHORS ChangeLog CONTRIBUTING.rst README.rst
%python_alternative %{_bindir}/pbr
%{python_sitelib}/pbr
%{python_sitelib}/pbr-%{version}-py%{python_version}.egg-info
%endif
%changelog