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

%global modname backlash

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

Group:              Development/Libraries
License:            MIT
URL:                https://pypi.io/project/backlash
Source0:            https://pypi.io/packages/source/b/%{modname}/%{modname}-%{version}.tar.gz

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
%{__python} setup.py build

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


%install
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
pushd %{buildroot}/%{python_sitelib}/%{modname}/statics > /dev/null
rm -f  opensans.ttf
ln -s  /usr/share/fonts/open-sans/OpenSans-Regular.ttf opensans.ttf
popd > /dev/null

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
pushd %{buildroot}/%{python3_sitelib}/%{modname}/statics > /dev/null
rm -f  opensans.ttf
ln -s  /usr/share/fonts/open-sans/OpenSans-Regular.ttf opensans.ttf
popd > /dev/null
popd
%endif


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

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


%changelog
* 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