Blob Blame History Raw
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%global with_python3 1
%endif

%define modname zope.deprecation

Name:           python-zope-deprecation
Version:        4.1.1
Release:        3%{?dist}
Summary:        Zope 3 Deprecation Infrastructure

Group:          Development/Libraries
License:        ZPLv2.1
URL:            http://pypi.python.org/pypi/zope.deprecation
Source0:        http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python-setuptools

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%endif

%description
This package provides a simple function called 'deprecated(names, reason)' to
deprecate the previously mentioned Python objects.

%if 0%{?with_python3}
%package -n python3-zope-deprecation
Summary:        Zope 3 Deprecation Infrastructure
Group:          Development/Libraries

%description -n python3-zope-deprecation
This package provides a simple function called 'deprecated(names, reason)' to
deprecate the previously mentioned Python objects.
%endif

%prep
%setup -q -n %{modname}-%{version}

rm -rf %{modname}.egg-info

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
rm -f %{buildroot}%{python3_sitelib}/zope/deprecation/tests.py*
popd
%endif

%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
rm -f %{buildroot}%{python_sitelib}/zope/deprecation/tests.py*

%check
%{__python} setup.py test

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif

%files
%doc README.rst LICENSE.txt
%{python_sitelib}/zope/deprecation/
%{python_sitelib}/%{modname}-%{version}-*

%if 0%{?with_python3}
%files -n python3-zope-deprecation
%doc README.rst LICENSE.txt
%{python3_sitelib}/zope/deprecation/
%{python3_sitelib}/%{modname}-%{version}-*
%endif


%changelog
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 4.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Sun May 04 2014 Luke Macken <lmacken@redhat.com> - 4.1.1-1
- Update to 4.1.1
- Include the license
- Fix the changelog per rpmlint

* Fri Dec 06 2013 Pierre-Yves Chibon <pingou@pingoured>fr - 3.5.1-4
- Change BR from python-setuptools-devel to python-setuptools
  See https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Nov 28 2012 Ralph Bean <rbean@redhat.com> - 3.5.1-1
- More modern upstream version.
- Added python3 packaging.
- Removed unnecessary defattr and clean section.
- Added check section.

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jan  2 2010 Luke Macken <lmacken@redhat.com> - 3.4.0-1
- Initial package