[1741] | 1 | %global with_python3 0 |
---|
| 2 | %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} |
---|
| 3 | |
---|
| 4 | Name: python-markupsafe |
---|
[3793] | 5 | Version: 0.12 |
---|
[1741] | 6 | Release: 1%{?_dist_release} |
---|
| 7 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
---|
| 8 | |
---|
| 9 | Group: Development/Languages |
---|
| 10 | License: BSD |
---|
| 11 | URL: http://pypi.python.org/pypi/MarkupSafe |
---|
| 12 | Source0: http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz |
---|
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
| 14 | |
---|
| 15 | BuildRequires: python-devel python-setuptools |
---|
| 16 | |
---|
| 17 | %if 0%{?with_python3} |
---|
| 18 | BuildRequires: python3-devel python3-setuptools |
---|
| 19 | # For /usr/bin/2to3 |
---|
| 20 | BuildRequires: python-tools |
---|
| 21 | %endif # if with_python3 |
---|
| 22 | |
---|
[3793] | 23 | Vendor: Project Vine |
---|
| 24 | Distribution: Vine Linux |
---|
[1741] | 25 | |
---|
| 26 | %description |
---|
| 27 | A library for safe markup escaping. |
---|
| 28 | |
---|
| 29 | %if 0%{?with_python3} |
---|
| 30 | %package -n python3-markupsafe |
---|
| 31 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
---|
| 32 | Group: Development/Languages |
---|
| 33 | |
---|
| 34 | %description -n python3-markupsafe |
---|
| 35 | A library for safe markup escaping. |
---|
| 36 | %endif #if with_python3 |
---|
| 37 | |
---|
| 38 | %prep |
---|
| 39 | %setup -q -n MarkupSafe-%{version} |
---|
| 40 | |
---|
| 41 | %if 0%{?with_python3} |
---|
| 42 | %__rm -rf %{py3dir} |
---|
| 43 | %__cp -a . %{py3dir} |
---|
| 44 | 2to3 --write --nobackups %{py3dir} |
---|
| 45 | %endif # with_python3 |
---|
| 46 | |
---|
| 47 | %build |
---|
| 48 | CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
---|
| 49 | |
---|
| 50 | %if 0%{?with_python3} |
---|
| 51 | pushd %{py3dir} |
---|
| 52 | CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build |
---|
| 53 | popd |
---|
| 54 | %endif # with_python3 |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | %install |
---|
| 58 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 59 | %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
---|
| 60 | # C code errantly gets installed |
---|
| 61 | %__rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c |
---|
| 62 | |
---|
| 63 | %if 0%{?with_python3} |
---|
| 64 | pushd %{py3dir} |
---|
| 65 | %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
---|
| 66 | %__rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c |
---|
| 67 | popd |
---|
| 68 | %endif # with_python3 |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | %check |
---|
| 72 | %{__python} setup.py test |
---|
| 73 | |
---|
| 74 | %if 0%{?with_python3} |
---|
| 75 | pushd %{py3dir} |
---|
| 76 | %{__python3} setup.py test |
---|
| 77 | popd |
---|
| 78 | %endif # with_python3 |
---|
| 79 | |
---|
| 80 | %clean |
---|
| 81 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | %files |
---|
| 85 | %defattr(-,root,root,-) |
---|
| 86 | %doc AUTHORS LICENSE README.rst |
---|
| 87 | %{python_sitearch}/* |
---|
| 88 | |
---|
| 89 | %if 0%{?with_python3} |
---|
| 90 | %files -n python3-markupsafe |
---|
| 91 | %defattr(-,root,root,-) |
---|
| 92 | %doc AUTHORS LICENSE README.rst |
---|
| 93 | %{python3_sitearch}/* |
---|
| 94 | %endif # with_python3 |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | %changelog |
---|
[3793] | 98 | * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 0.12-1 |
---|
| 99 | - new upstream release |
---|
| 100 | - add Vendor and Distribution tags |
---|
| 101 | |
---|
[1741] | 102 | * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.2-1 |
---|
| 103 | - initial build based on Fedora development |
---|
| 104 | |
---|
| 105 | * Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4 |
---|
| 106 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
| 107 | |
---|
| 108 | * Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3 |
---|
| 109 | - Fix missing setuptools BuildRequires. |
---|
| 110 | |
---|
| 111 | * Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2 |
---|
| 112 | - Fixed sitearch and python3 definitions to work better with older Fedora/RHEL. |
---|
| 113 | |
---|
| 114 | * Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1 |
---|
| 115 | - Initial version. |
---|