2016-02-16 13:09:25 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-reno
|
|
|
|
#
|
2016-06-06 11:20:46 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-02-16 13:09:25 +00:00
|
|
|
#
|
|
|
|
# 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/
|
2016-06-06 11:20:46 +00:00
|
|
|
#
|
2016-02-16 13:09:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-reno
|
2016-08-25 12:49:00 +00:00
|
|
|
Version: 1.8.0
|
2016-02-16 13:09:25 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: RElease NOtes manager
|
2016-06-06 11:20:46 +00:00
|
|
|
License: Apache-2.0
|
2016-02-16 13:09:25 +00:00
|
|
|
Group: Development/Languages/Python
|
2016-06-06 11:20:46 +00:00
|
|
|
Url: http://www.openstack.org/
|
2016-08-25 12:54:55 +00:00
|
|
|
Source: https://pypi.io/packages/source/r/reno/reno-%{version}.tar.gz
|
2016-02-16 13:09:25 +00:00
|
|
|
BuildRequires: python-Babel
|
2016-06-06 11:20:46 +00:00
|
|
|
BuildRequires: python-PyYAML
|
2016-02-16 13:09:25 +00:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-pbr
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: python-testrepository
|
|
|
|
BuildRequires: python-testscenarios
|
|
|
|
BuildRequires: python-testtools
|
|
|
|
%endif
|
|
|
|
Requires: python-Babel >= 1.3
|
|
|
|
Requires: python-PyYAML >= 3.1.0
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Reno is a release notes manager for storing release notes in a git
|
|
|
|
repository and then building documentation from them.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n reno-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
python setup.py test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Prepare for update-alternatives usage
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
for p in reno ; do
|
|
|
|
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
|
|
|
|
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
|
|
|
|
# create a dummy target for /etc/alternatives/$p
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/$p
|
|
|
|
done
|
|
|
|
|
|
|
|
%post
|
|
|
|
%_sbindir/update-alternatives \
|
|
|
|
--install %{_bindir}/reno reno %{_bindir}/reno-%{py_ver} 30
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
%_sbindir/update-alternatives --remove reno %{_bindir}/reno-%{py_ver}
|
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LICENSE ChangeLog README.rst AUTHORS
|
|
|
|
%{_bindir}/reno
|
|
|
|
%{_bindir}/reno-%{py_ver}
|
|
|
|
%ghost %{_sysconfdir}/alternatives/reno
|
|
|
|
%{python_sitelib}/reno
|
|
|
|
%{python_sitelib}/*.egg-info
|
|
|
|
|
|
|
|
%changelog
|