0a2ee1
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
0a2ee1
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
0a2ee1
0a2ee1
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 9 || 0%{?rhel} >= 6
0a2ee1
%bcond_without egg
0a2ee1
%endif
0a2ee1
0a2ee1
%global with_python3 0
0a2ee1
0a2ee1
Name:		python-augeas
0a2ee1
Version:	0.5.0
0a2ee1
Release:	2%{?dist}
0a2ee1
Summary:	Python bindings to augeas
0a2ee1
Group:		Development/Languages
0a2ee1
License:	LGPLv2+
0a2ee1
URL:		http://augeas.net/
0a2ee1
Source0:	http://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
0a2ee1
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0a2ee1
Requires:	augeas-libs
0a2ee1
BuildArch:	noarch
0a2ee1
0a2ee1
BuildRequires:	python-setuptools python-devel
0a2ee1
%if 0%{?with_python3}
0a2ee1
BuildRequires:	python3-setuptools python3-devel
0a2ee1
%endif # with_python3
0a2ee1
0a2ee1
%description
0a2ee1
python-augeas is a set of Python bindings around augeas.
0a2ee1
0a2ee1
0a2ee1
%if 0%{?with_python3}
0a2ee1
%package -n python3-augeas
0a2ee1
Summary:	Python 3 bindings to augeas
0a2ee1
Requires:	augeas-libs
0a2ee1
0a2ee1
%description -n python3-augeas
0a2ee1
python3-augeas is a set of Python bindings around augeas.
0a2ee1
%endif # with_python3
0a2ee1
0a2ee1
0a2ee1
%prep
0a2ee1
%setup -q
0a2ee1
0a2ee1
%if 0%{?with_python3}
0a2ee1
rm -rf %{py3dir}
0a2ee1
cp -a . %{py3dir}
0a2ee1
%endif # with_python3
0a2ee1
0a2ee1
%build
0a2ee1
# Remove CFLAGS=... for noarch packages (unneeded)
0a2ee1
CFLAGS="$RPM_OPT_FLAGS"
0a2ee1
%{__python} setup.py build_ext -i
0a2ee1
%{__python} setup.py build
0a2ee1
0a2ee1
%if 0%{?with_python3}
0a2ee1
pushd %{py3dir}
0a2ee1
%{__python3} setup.py build_ext -i
0a2ee1
%{__python3} setup.py build
0a2ee1
popd
0a2ee1
%endif # with_python3
0a2ee1
0a2ee1
%install
0a2ee1
rm -rf $RPM_BUILD_ROOT
0a2ee1
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
0a2ee1
0a2ee1
%if 0%{?with_python3}
0a2ee1
pushd %{py3dir}
0a2ee1
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
0a2ee1
popd
0a2ee1
%endif # with_python3
0a2ee1
0a2ee1
%files
0a2ee1
%doc COPYING AUTHORS README.txt
0a2ee1
%{python_sitelib}/augeas.py*
0a2ee1
%if %{with egg}
0a2ee1
%{python_sitelib}/*augeas*.egg-info
0a2ee1
%endif
0a2ee1
0a2ee1
%if 0%{?with_python3}
0a2ee1
%files -n python3-augeas
0a2ee1
%doc COPYING AUTHORS README.txt
0a2ee1
%{python3_sitelib}/*
0a2ee1
%endif # with_python3
0a2ee1
0a2ee1
0a2ee1
%changelog
0a2ee1
* Mon Sep 22 2014 Tomas Radej <tradej@redhat.com> - 0.5.0-2
0a2ee1
- Added Python 3 subpackage
0a2ee1
0a2ee1
* Thu Sep 04 2014 Greg Swift <gregswift@gmail.com> - 0.5.0-1
0a2ee1
- Version 0.5.0 release
0a2ee1
0a2ee1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-6
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0a2ee1
0a2ee1
* Tue Oct 22 2013 Greg Swift <gregswift@gmail.com> - 0.4.1-5
0a2ee1
- add python-ctypes dependency (rhbz#1020239)
0a2ee1
0a2ee1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-4
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0a2ee1
0a2ee1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0a2ee1
0a2ee1
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0a2ee1
0a2ee1
* Mon Jan 16 2012 Greg Swift <gregswift@gmail.com> 0.4.1-1
0a2ee1
- version 0.4.1
0a2ee1
- include egg only on F-9, RHEL-6 and later
0a2ee1
0a2ee1
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-8
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0a2ee1
0a2ee1
* Fri Feb 18 2011 Harald Hoyer <harald@redhat.com> 0.3.0-7
0a2ee1
- only include egg-info, if fedora >=9 or rhel >= 6
0a2ee1
Resolves: rhbz#661452
0a2ee1
0a2ee1
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-6
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0a2ee1
0a2ee1
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.0-5
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
0a2ee1
0a2ee1
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-4
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0a2ee1
0a2ee1
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
0a2ee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0a2ee1
0a2ee1
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.3.0-2
0a2ee1
- Rebuild for Python 2.6
0a2ee1
0a2ee1
* Tue Sep 09 2008 Harald Hoyer <harald@redhat.com> 0.3.0-1
0a2ee1
- version 0.3.0
0a2ee1
0a2ee1
* Thu Jul 03 2008 Harald Hoyer <harald@redhat.com> 0.2.1-1
0a2ee1
- version 0.2.1
0a2ee1
0a2ee1
* Wed Jun 11 2008 Harald Hoyer <harald@redhat.com> 0.2.0-1
0a2ee1
- switched to noarch, dlopen/ python bindings
0a2ee1
0a2ee1
* Mon May 05 2008 Harald Hoyer <harald@redhat.com> 0.1.0-4
0a2ee1
- version to import in CVS (rhbz#444945)
0a2ee1
0a2ee1
* Mon May 05 2008 Harald Hoyer <harald@redhat.com> 0.1.0-3
0a2ee1
- set mode of _augeas.so to 0755
0a2ee1
0a2ee1
* Mon May 05 2008 Harald Hoyer <harald@redhat.com> 0.1.0-2
0a2ee1
- wildcard to catch egg-info in case it is build
0a2ee1
0a2ee1
* Fri May 02 2008 Harald Hoyer <harald@redhat.com> 0.1.0-1
0a2ee1
- new version
0a2ee1
0a2ee1
* Wed Apr 16 2008 Harald Hoyer <harald@redhat.com> - 0.0.8-1
0a2ee1
- initial version