You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
141 lines
4.1 KiB
141 lines
4.1 KiB
%global with_python3 1 |
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} |
|
%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} |
|
|
|
Name: python-markupsafe |
|
Version: 0.11 |
|
Release: 10%{?dist} |
|
Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
|
|
|
Group: Development/Languages |
|
License: BSD |
|
URL: http://pypi.python.org/pypi/MarkupSafe |
|
Source0: https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz |
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|
|
|
BuildRequires: python-devel python-setuptools-devel |
|
|
|
%if 0%{?with_python3} |
|
BuildRequires: python3-devel python3-setuptools |
|
# For /usr/bin/2to3 |
|
BuildRequires: python-tools |
|
%endif # if with_python3 |
|
|
|
|
|
%description |
|
A library for safe markup escaping. |
|
|
|
%if 0%{?with_python3} |
|
%package -n python3-markupsafe |
|
Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
|
Group: Development/Languages |
|
|
|
%description -n python3-markupsafe |
|
A library for safe markup escaping. |
|
%endif #if with_python3 |
|
|
|
%prep |
|
%setup -q -n MarkupSafe-%{version} |
|
|
|
%if 0%{?with_python3} |
|
rm -rf %{py3dir} |
|
cp -a . %{py3dir} |
|
2to3 --write --nobackups %{py3dir} |
|
%endif # with_python3 |
|
|
|
%build |
|
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
|
|
|
%if 0%{?with_python3} |
|
pushd %{py3dir} |
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build |
|
popd |
|
%endif # with_python3 |
|
|
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
%{__python} setup.py install -O2 --skip-build --root $RPM_BUILD_ROOT |
|
# C code errantly gets installed |
|
rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c |
|
|
|
%if 0%{?with_python3} |
|
pushd %{py3dir} |
|
%{__python3} setup.py install -O2 --skip-build --root $RPM_BUILD_ROOT |
|
rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c |
|
popd |
|
%endif # with_python3 |
|
|
|
|
|
%check |
|
%{__python} setup.py test |
|
|
|
%if 0%{?with_python3} |
|
pushd %{py3dir} |
|
%{__python3} setup.py test |
|
popd |
|
%endif # with_python3 |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|
|
%files |
|
%defattr(-,root,root,-) |
|
%doc AUTHORS LICENSE README.rst |
|
%{python_sitearch}/* |
|
|
|
%if 0%{?with_python3} |
|
%files -n python3-markupsafe |
|
%defattr(-,root,root,-) |
|
%doc AUTHORS LICENSE README.rst |
|
%{python3_sitearch}/* |
|
%endif # with_python3 |
|
|
|
|
|
%changelog |
|
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.11-10 |
|
- Mass rebuild 2014-01-24 |
|
|
|
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.11-9 |
|
- Mass rebuild 2013-12-27 |
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-8 |
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
|
|
|
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.11-7 |
|
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 |
|
|
|
* Fri Aug 3 2012 David Malcolm <dmalcolm@redhat.com> - 0.11-6 |
|
- remove rhel logic from with_python3 conditional |
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-5 |
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
|
|
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4 |
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
|
|
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-3 |
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
|
|
|
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 0.11-2 |
|
- rebuild for newer python3 |
|
|
|
* Thu Sep 30 2010 Luke Macken <lmacken@redhat.com> - 0.11-1 |
|
- Update to 0.11 |
|
|
|
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9.2-5 |
|
- rebuild with python3.2 |
|
http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html |
|
|
|
* Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4 |
|
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
|
|
|
* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3 |
|
- Fix missing setuptools BuildRequires. |
|
|
|
* Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2 |
|
- Fixed sitearch and python3 definitions to work better with older Fedora/RHEL. |
|
|
|
* Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1 |
|
- Initial version.
|
|
|