Blob Blame Raw
%if 0%{?fedora}
%global with_python3 1
%endif

%global modname backlash

Name:               python-backlash
Version:            0.1.4
Release:            1%{?dist}
Summary:            Standalone WebOb port of the Werkzeug Debugger

License:            MIT
URL:                https://pypi.io/project/backlash
Source0:            %pypi_source backlash

BuildArch:          noarch

BuildRequires:      python2-devel
BuildRequires:      python2-setuptools

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


%global _description\
backlash is a standalone version of the Werkzeug Debugger based on WebOb\
adapted to support for Python3.\
\
backlash has born as a future replacement for WebError in upcoming TurboGears2\
versions.

%description %_description

%package -n python2-backlash
Summary: %summary
Requires:           python2-webob
Requires:           open-sans-fonts
%{?python_provide:%python_provide python2-backlash}

%description -n python2-backlash %_description

%if 0%{?with_python3}
%package -n python3-backlash
Summary:            Standalone WebOb port of the Werkzeug Debugger with Python3 support meant to replace WebError in TurboGears2
Group:              Development/Libraries

Requires:           python3-webob
Requires:           open-sans-fonts

%description -n python3-backlash
backlash is a standalone version of the Werkzeug Debugger based on WebOb
adapted to support for Python3.

backlash has born as a future replacement for WebError in upcoming
TurboGears2 versions.
%endif


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

# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif


%build
%py2_build

%if 0%{?with_python3}
pushd %{py3dir}
%py3_build
popd
%endif


%install
%py2_install
ln -sfv /usr/share/fonts/open-sans/OpenSans-Regular.ttf %{buildroot}/%{python2_sitelib}/%{modname}/statics/opensans.ttf

%if 0%{?with_python3}
pushd %{py3dir}
%py3_install
ln -sfv /usr/share/fonts/open-sans/OpenSans-Regular.ttf %{buildroot}/%{python3_sitelib}/%{modname}/statics/opensans.ttf
popd
%endif


%files -n python2-backlash
%doc README.rst
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*

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


%changelog
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.4-1
- Update to 0.1.4

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.3-4
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.3-2
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Wed Oct 18 2017 Ralph Bean <rbean@redhat.com> - 0.1.3-1
- new version

* Fri Sep 15 2017 Kevin Fenzi <kevin@scrye.com> - 0.1.2-4
- Unbundle open-sans-font. Fixes #1465421

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.2-3
- Python 2 binary package renamed to python2-backlash
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue Mar 21 2017 Ralph Bean <rbean@redhat.com> - 0.1.2-1
- new version

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.1.1-3
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Mon Apr 04 2016 Ralph Bean <rbean@redhat.com> - 0.1.1-1
- new version

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 0.1.0-1
- new version

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri May 15 2015 Ralph Bean <rbean@redhat.com> - 0.0.8-1
- new version

* Wed Aug 20 2014 Ralph Bean <rbean@redhat.com> - 0.0.6-1
- Latest upstream.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 0.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Wed Jan 22 2014 Ralph Bean <rbean@redhat.com> - 0.0.4-1
- Latest upstream
- Fixed python3 requires.
- Remove patch now that it has been pushed upstream.

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

* Thu Apr 04 2013 Luke Macken <lmacken@redhat.com> 0.0.1-0.3.a2
- Build the python3 subpackage
- Fix pre-release version

* Wed Apr 03 2013 Luke Macken <lmacken@redhat.com> 0.0.1a2-2
- Remove the non-free ubuntu font
- Require python-webob

* Wed Apr 03 2013 Luke Macken <lmacken@redhat.com> 0.0.1a2-1
- Initial package for Fedora