%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%if 0%{?fedora}
%global with_python3 1
%endif
%define modname zope.deprecation
Name: python-zope-deprecation
Version: 4.3.0
Release: 2%{?dist}
Summary: Zope 3 Deprecation Infrastructure
Group: Development/Libraries
License: ZPLv2.1
URL: https://pypi.python.org/pypi/zope.deprecation
Source0: https://files.pythonhosted.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%global _description\
This package provides a simple function called 'deprecated(names, reason)' to\
deprecate the previously mentioned Python objects.
%description %_description
%package -n python2-zope-deprecation
Summary: %summary
%{?python_provide:%python_provide python2-zope-deprecation}
%description -n python2-zope-deprecation %_description
%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 -n python2-zope-deprecation
%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
* Thu Feb 08 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.3.0-2
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Tue Feb 06 2018 Lumír Balhar <lbalhar@redhat.com> - 4.3.0-1
- New upstream release
- URLs with SSL
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.1.1-13
- Python 2 binary package renamed to python2-zope-deprecation
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.1.1-10
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Oct 14 2014 Ralph Bean <rbean@redhat.com> - 4.1.1-4
- Corrected with_python3 conditional for epel7.
* 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