2dcffe6
%if 0%{?fedora}
2dcffe6
%global with_python3 1
2dcffe6
%endif
2dcffe6
2dcffe6
%{!?_licensedir: %global license %%doc}
2dcffe6
2dcffe6
%if 0%{?rhel} && 0%{?rhel} <= 6
2dcffe6
%{!?__python2:        %global __python2 /usr/bin/python2}
2dcffe6
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
2dcffe6
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
2dcffe6
%endif
2dcffe6
31ff699
%global modname twiggy
31ff699
%global distname Twiggy
31ff699
31ff699
Name:               python-twiggy
efd737f
Version:            0.4.7
d934dae
Release:            11%{?dist}
31ff699
Summary:            A Pythonic logger
31ff699
31ff699
Group:              Development/Libraries
31ff699
License:            BSD
31ff699
URL:                http://pypi.python.org/pypi/Twiggy
31ff699
Source0:            http://pypi.python.org/packages/source/T/%{distname}/%{distname}-%{version}.tar.gz
31ff699
31ff699
BuildArch:          noarch
31ff699
31ff699
BuildRequires:      python2-devel
2dcffe6
BuildRequires:      python2-setuptools
d934dae
BuildRequires:      python2-sphinx
31ff699
2dcffe6
%if 0%{?with_python3}
2dcffe6
BuildRequires:      python3-devel
2dcffe6
BuildRequires:      python3-setuptools
2dcffe6
BuildRequires:      python3-sphinx
2dcffe6
%endif
2dcffe6
31ff699
%description
31ff699
Twiggy is a Pythonic logger.
31ff699
2dcffe6
You should use Twiggy because it is awesome. For more information, read the
2dcffe6
`documentation <http://twiggy.wearpants.org>`_ or `see this blog post
2dcffe6
<http://blog.wearpants.org/meet-twiggy>`_.
2dcffe6
2dcffe6
%package -n python2-%{modname}
2dcffe6
Summary:            A Pythonic logger
7483c52
%{?python_provide:%python_provide python2-%{modname}}
2dcffe6
2dcffe6
%description -n python2-%{modname}
2dcffe6
Twiggy is a Pythonic logger.
2dcffe6
2dcffe6
You should use Twiggy because it is awesome. For more information, read the
2dcffe6
`documentation <http://twiggy.wearpants.org>`_ or `see this blog post
2dcffe6
<http://blog.wearpants.org/meet-twiggy>`_.
2dcffe6
2dcffe6
%if 0%{?with_python3}
2dcffe6
%package -n python3-%{modname}
2dcffe6
Summary:            A Pythonic logger
7483c52
%{?python_provide:%python_provide python3-%{modname}}
2dcffe6
2dcffe6
%description -n python3-%{modname}
2dcffe6
Twiggy is a Pythonic logger.
2dcffe6
2dcffe6
You should use Twiggy because it is awesome. For more information, read the
2dcffe6
`documentation <http://twiggy.wearpants.org>`_ or `see this blog post
2dcffe6
<http://blog.wearpants.org/meet-twiggy>`_.
2dcffe6
%endif
2dcffe6
31ff699
%prep
2dcffe6
%autosetup -n %{distname}-%{version}
31ff699
31ff699
# Remove bundled egg-info in case it exists
31ff699
rm -rf %{distname}.egg-info
31ff699
31ff699
%build
2dcffe6
%py2_build
2dcffe6
%if 0%{?with_python3}
2dcffe6
%py3_build
2dcffe6
%endif
31ff699
31ff699
%install
2dcffe6
%py2_install
2dcffe6
%if 0%{?with_python3}
2dcffe6
%py3_install
2dcffe6
%endif
31ff699
31ff699
# There are errors in the test suite.
31ff699
#%%check
31ff699
#./scripts/run-twiggy-tests.sh
31ff699
2dcffe6
%files -n python2-%{modname}
2dcffe6
%doc README.rst
2dcffe6
%license LICENSE
31ff699
%{python2_sitelib}/%{modname}/
31ff699
%{python2_sitelib}/%{distname}-%{version}*
31ff699
2dcffe6
%if 0%{?with_python3}
2dcffe6
%files -n python3-%{modname}
2dcffe6
%doc README.rst
2dcffe6
%license LICENSE
2dcffe6
%{python3_sitelib}/%{modname}/
2dcffe6
%{python3_sitelib}/%{distname}-%{version}-*
2dcffe6
%endif
2dcffe6
31ff699
%changelog
d934dae
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.4.7-11
d934dae
- Update Python 2 dependency declarations to new packaging standards
d934dae
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
d934dae
4bd9e54
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-10
4bd9e54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4bd9e54
f6c2813
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-9
f6c2813
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f6c2813
33eef7a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-8
33eef7a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
33eef7a
b713624
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.4.7-7
b713624
- Rebuild for Python 3.6
b713624
5b9169e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-6
5b9169e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
5b9169e
333f422
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-5
333f422
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
333f422
7483c52
* Sat Nov 21 2015 Kalev Lember <klember@redhat.com> - 0.4.7-4
7483c52
- Fix an unexpanded macro
7483c52
2dcffe6
* Mon Nov 16 2015 Ralph Bean <rbean@redhat.com> - 0.4.7-3
2dcffe6
- Python3 subpackage and modernize python macros.
2dcffe6
06443fd
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-2
06443fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
06443fd
efd737f
* Fri Mar 13 2015 Ralph Bean <rbean@redhat.com> - 0.4.7-1
efd737f
- new version
efd737f
4190a63
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-3
4190a63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4190a63
31ff699
* Fri Nov 01 2013 Ralph Bean <rbean@redhat.com> - 0.4.5-2
31ff699
- Modernize python rpm macros as per review feedback.
31ff699
31ff699
* Thu Oct 31 2013 Ralph Bean <rbean@redhat.com> - 0.4.5-1
31ff699
- initial package for Fedora