| 1 | %global with_python3 1 |
|---|
| 2 | |
|---|
| 3 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
|---|
| 4 | Name: python-markupsafe |
|---|
| 5 | Version: 1.1.1 |
|---|
| 6 | Release: 2%{?_dist_release} |
|---|
| 7 | Group: programming |
|---|
| 8 | Vendor: Project Vine |
|---|
| 9 | Distribution: Vine Linux |
|---|
| 10 | |
|---|
| 11 | License: BSD |
|---|
| 12 | URL: https://pypi.python.org/pypi/MarkupSafe |
|---|
| 13 | Source0: https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz |
|---|
| 14 | |
|---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|---|
| 16 | |
|---|
| 17 | BuildRequires: python-rpm-macros |
|---|
| 18 | BuildRequires: python-devel python-setuptools python2-rpm-macros |
|---|
| 19 | %if 0%{?with_python3} |
|---|
| 20 | BuildRequires: python3-devel python3-setuptools python3-rpm-macros |
|---|
| 21 | %endif # if with_python3 |
|---|
| 22 | |
|---|
| 23 | %description |
|---|
| 24 | A library for safe markup escaping. |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | %if 0%{?with_python3} |
|---|
| 28 | %package -n python3-markupsafe |
|---|
| 29 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python |
|---|
| 30 | Group: programming |
|---|
| 31 | |
|---|
| 32 | %description -n python3-markupsafe |
|---|
| 33 | A library for safe markup escaping. |
|---|
| 34 | %endif #if with_python3 |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | %prep |
|---|
| 38 | %setup -q -n MarkupSafe-%{version} |
|---|
| 39 | |
|---|
| 40 | %if 0%{?with_python3} |
|---|
| 41 | %__rm -rf %{py3dir} |
|---|
| 42 | %__cp -a . %{py3dir} |
|---|
| 43 | %endif # with_python3 |
|---|
| 44 | |
|---|
| 45 | %build |
|---|
| 46 | export CFLAGS="$RPM_OPT_FLAGS" |
|---|
| 47 | %py2_build |
|---|
| 48 | %if 0%{?with_python3} |
|---|
| 49 | %py3_build |
|---|
| 50 | %endif # with_python3 |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | %install |
|---|
| 54 | %__rm -rf $RPM_BUILD_ROOT |
|---|
| 55 | %py2_install |
|---|
| 56 | # C code errantly gets installed |
|---|
| 57 | %__rm $RPM_BUILD_ROOT/%{python_sitearch}/markupsafe/*.c |
|---|
| 58 | %if 0%{?with_python3} |
|---|
| 59 | %py3_install |
|---|
| 60 | %__rm $RPM_BUILD_ROOT/%{python3_sitearch}/markupsafe/*.c |
|---|
| 61 | %endif # with_python3 |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | %check |
|---|
| 65 | %{__python2} setup.py test |
|---|
| 66 | |
|---|
| 67 | %if 0%{?with_python3} |
|---|
| 68 | %{__python3} setup.py test |
|---|
| 69 | %endif # with_python3 |
|---|
| 70 | |
|---|
| 71 | %clean |
|---|
| 72 | %__rm -rf $RPM_BUILD_ROOT |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | %files |
|---|
| 76 | %defattr(-,root,root,-) |
|---|
| 77 | %license LICENSE* |
|---|
| 78 | %doc CHANGES* README* |
|---|
| 79 | %{python2_sitearch}/* |
|---|
| 80 | |
|---|
| 81 | %if 0%{?with_python3} |
|---|
| 82 | %files -n python3-markupsafe |
|---|
| 83 | %defattr(-,root,root,-) |
|---|
| 84 | %license LICENSE* |
|---|
| 85 | %doc CHANGES* README* |
|---|
| 86 | %{python3_sitearch}/* |
|---|
| 87 | %endif # with_python3 |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | %changelog |
|---|
| 91 | * Thu Oct 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-2 |
|---|
| 92 | - rebuilt with python3.8. |
|---|
| 93 | |
|---|
| 94 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-1 |
|---|
| 95 | - new upstream release. |
|---|
| 96 | |
|---|
| 97 | * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.0-1 |
|---|
| 98 | - new upstream release. |
|---|
| 99 | - added python3 support. |
|---|
| 100 | |
|---|
| 101 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12-3 |
|---|
| 102 | - rebuild with VineSeed environment |
|---|
| 103 | |
|---|
| 104 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.12-2 |
|---|
| 105 | - rebuild with python-2.7.2 |
|---|
| 106 | |
|---|
| 107 | * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 0.12-1 |
|---|
| 108 | - new upstream release |
|---|
| 109 | - add Vendor and Distribution tags |
|---|
| 110 | |
|---|
| 111 | * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.2-1 |
|---|
| 112 | - initial build based on Fedora development |
|---|
| 113 | |
|---|
| 114 | * Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-4 |
|---|
| 115 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
|---|
| 116 | |
|---|
| 117 | * Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-3 |
|---|
| 118 | - Fix missing setuptools BuildRequires. |
|---|
| 119 | |
|---|
| 120 | * Thu Jun 24 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-2 |
|---|
| 121 | - Fixed sitearch and python3 definitions to work better with older Fedora/RHEL. |
|---|
| 122 | |
|---|
| 123 | * Wed Jun 23 2010 Kyle VanderBeek <kylev@kylev.com> - 0.9.2-1 |
|---|
| 124 | - Initial version. |
|---|