forked from pool/python-oslo.config
OBS-URL: https://build.opensuse.org/package/show/Cloud:OpenStack:Factory/python-oslo.config?expand=0&rev=17
108 lines
3.7 KiB
RPMSpec
108 lines
3.7 KiB
RPMSpec
#
|
|
# spec file for package python-oslo.config
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-oslo.config
|
|
Version: 1.3.0
|
|
Release: 0
|
|
Url: https://launchpad.net/oslo/
|
|
Summary: OpenStack configuration API
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
Source: http://tarballs.openstack.org/oslo.config/oslo.config-%{version}.tar.gz
|
|
Source99: rpmlintrc
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-pbr
|
|
# Documentation requirements:
|
|
BuildRequires: python-oslosphinx
|
|
# Test requirements:
|
|
#BuildRequires: python-coverage >= 3.6
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
BuildRequires: python-argparse
|
|
BuildRequires: python-discover
|
|
%endif
|
|
BuildRequires: python-fixtures >= 0.3.14
|
|
BuildRequires: python-mock >= 1.0
|
|
BuildRequires: python-oslotest
|
|
BuildRequires: python-python-subunit >= 0.0.18
|
|
BuildRequires: python-six >= 1.5.2
|
|
BuildRequires: python-testrepository >= 0.0.17
|
|
BuildRequires: python-testscenarios >= 0.4
|
|
BuildRequires: python-testtools >= 0.9.32
|
|
Requires: python-pbr
|
|
Requires: python-six >= 1.5.2
|
|
Provides: python-oslo-config = 2013.2
|
|
Obsoletes: python-oslo-config < 2013.2
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
Requires: python-argparse
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
%else
|
|
BuildArch: noarch
|
|
%endif
|
|
Provides: %{name}-test = %{version}
|
|
Obsoletes: %{name}-test <= %{version}
|
|
|
|
%description
|
|
The Oslo configuration API supports parsing command line arguments and
|
|
.ini style configuration files.
|
|
|
|
%package doc
|
|
Summary: OpenStack configuration API - Documentation
|
|
Group: Documentation/HTML
|
|
Requires: %{name} = %{version}
|
|
BuildRequires: python-Sphinx
|
|
Provides: python-oslo-config-doc = 2013.2
|
|
Obsoletes: python-oslo-config-doc < 2013.2
|
|
|
|
%description doc
|
|
This package contains documentation files for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n oslo.config-%{version}
|
|
|
|
%build
|
|
python setup.py build
|
|
python setup.py build_sphinx && rm doc/build/html/.buildinfo
|
|
|
|
%install
|
|
python setup.py install --skip-build --root=%{buildroot} --prefix=%{_prefix} --install-data=%{python_sitelib}
|
|
%fdupes doc
|
|
|
|
%check
|
|
# NOTE(saschpe): oslo.sphinx puts a *.pth file into %{python_sitelib} (an EPIC FAIL for itself), oslo.config also
|
|
# has one in $BUILDROOT. But the former takes precedence since %{python_sitelib} is always last sys.path. Thus
|
|
# tests can never find the oslo.config module. Obviously PYTHONPATH alone won't help either. But distro-boys
|
|
# have bigger balls than stackers and fix themselves a custom load order with the magic '-S' flag:
|
|
export PYTHONPATH="%{python_sitelib}:%{buildroot}%{python_sitelib}"
|
|
export PYTHON="python -S"
|
|
testr init && testr run --parallel
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE README.rst AUTHORS
|
|
%{python_sitelib}/oslo
|
|
%{python_sitelib}/*.egg-info
|
|
%{python_sitelib}/*-nspkg.pth
|
|
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE doc/build/html
|
|
|
|
%changelog
|