3787eab
%if 0%{?fedora} > 12
b924c70
%global with_python3 1
b924c70
%else
b924c70
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
b924c70
%endif
b924c70
b924c70
Name: python-markupsafe
Orion Poplawski 3e4a2dc
Version: 0.23
c93d895
Release: 4%{?dist}
b924c70
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
b924c70
b924c70
Group: Development/Languages
b924c70
License: BSD
b924c70
URL: http://pypi.python.org/pypi/MarkupSafe
b924c70
Source0: http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
b924c70
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b924c70
b924c70
BuildRequires: python-devel python-setuptools-devel
b924c70
b924c70
%if 0%{?with_python3}
b924c70
BuildRequires: python3-devel python3-setuptools
b924c70
# For /usr/bin/2to3
b924c70
BuildRequires: python-tools
b924c70
%endif # if with_python3
b924c70
b924c70
b924c70
%description
b924c70
A library for safe markup escaping.
b924c70
b924c70
%if 0%{?with_python3}
b924c70
%package -n python3-markupsafe
b924c70
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
b924c70
Group: Development/Languages
b924c70
b924c70
%description -n python3-markupsafe
b924c70
A library for safe markup escaping.
b924c70
%endif #if with_python3
b924c70
b924c70
%prep
b924c70
%setup -q -n MarkupSafe-%{version}
b924c70
b924c70
%if 0%{?with_python3}
b924c70
rm -rf %{py3dir}
b924c70
cp -a . %{py3dir}
b924c70
2to3 --write --nobackups %{py3dir}
b924c70
%endif # with_python3
b924c70
b924c70
%build
b924c70
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
b924c70
b924c70
%if 0%{?with_python3}
b924c70
pushd %{py3dir}
b924c70
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
b924c70
popd
b924c70
%endif # with_python3
b924c70
b924c70
b924c70
%install
b924c70
rm -rf $RPM_BUILD_ROOT
b924c70
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
b924c70
# C code errantly gets installed
b924c70
rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c
b924c70
b924c70
%if 0%{?with_python3}
b924c70
pushd %{py3dir}
b924c70
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
b924c70
rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c
b924c70
popd
b924c70
%endif # with_python3
b924c70
b924c70
b924c70
%check
b924c70
%{__python} setup.py test
b924c70
b924c70
%if 0%{?with_python3}
b924c70
pushd %{py3dir}
b924c70
%{__python3} setup.py test
b924c70
popd
b924c70
%endif # with_python3
b924c70
b924c70
%clean
b924c70
rm -rf $RPM_BUILD_ROOT
b924c70
b924c70
b924c70
%files
b924c70
%doc AUTHORS LICENSE README.rst
b924c70
%{python_sitearch}/*
b924c70
b924c70
%if 0%{?with_python3}
b924c70
%files -n python3-markupsafe
b924c70
%doc AUTHORS LICENSE README.rst
b924c70
%{python3_sitearch}/*
b924c70
%endif # with_python3
b924c70
b924c70
b924c70
%changelog
c93d895
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.23-4
c93d895
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c93d895
Orion Poplawski 0132ae5
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 0.23-3
Orion Poplawski 0132ae5
- Really rebuild for Python 3.4
Orion Poplawski 0132ae5
Orion Poplawski 85a35cc
* Fri May  9 2014 Orion Poplawski <orion@cora.nwra.com> - 0.23-2
Orion Poplawski 85a35cc
- Rebuild for Python 3.4
Orion Poplawski 85a35cc
Orion Poplawski 3e4a2dc
* Fri May  9 2014 Orion Poplawski <orion@cora.nwra.com> - 0.23-1
Orion Poplawski 3e4a2dc
- Update to 0.23
Orion Poplawski 3e4a2dc
Luke Macken dfe682b
* Fri Oct 11 2013 Luke Macken <lmacken@redhat.com> - 0.18-1
Luke Macken dfe682b
- Update to 0.18 (#678537)
Luke Macken dfe682b
9705551
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-9
9705551
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9705551
5cf301f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-8
5cf301f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5cf301f
2e3464f
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.11-7
2e3464f
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
2e3464f
3787eab
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.11-6
3787eab
- remove rhel logic from with_python3 conditional
3787eab
14ced25
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-5
14ced25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
14ced25
e9d0a0c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
e9d0a0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e9d0a0c
a4462fc
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-3
a4462fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a4462fc
0485fd5
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 0.11-2
0485fd5
- rebuild for newer python3
0485fd5
Luke Macken 4b95763
* Thu Sep 30 2010 Luke Macken <lmacken@redhat.com> - 0.11-1
Luke Macken 4b95763
- Update to 0.11
Luke Macken 4b95763
8b41ccd
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9.2-5
8b41ccd
- rebuild with python3.2
8b41ccd
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
8b41ccd
a65e2ad
* Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4
a65e2ad
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a65e2ad
b924c70
* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3
b924c70
- Fix missing setuptools BuildRequires.
b924c70
b924c70
* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2
b924c70
- Fixed sitearch and python3 definitions to work better with older Fedora/RHEL.
b924c70
b924c70
* Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1
b924c70
- Initial version.