3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module markupsafe
8 Summary: MarkupSafe - a XML/HTML/XHTML Markup safe string for Python 2
9 Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 2 bezpieczny pod kątem znaczników XML/HTML/XHTML
10 Name: python-%{module}
14 Group: Development/Languages/Python
15 #Source0Download: https://pypi.org/pypi/MarkupSafe/
16 Source0: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
17 # Source0-md5: 49e3f3230cedb7ae34faf06913db83fc
18 URL: http://www.pocoo.org/projects/markupsafe/#markupsafe
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.710
22 BuildRequires: python-devel
23 BuildRequires: python-setuptools
26 BuildRequires: python-2to3
27 BuildRequires: python3-devel
28 BuildRequires: python3-setuptools
30 Requires: python-modules
31 Provides: python-MarkupSafe = %{version}-%{release}
32 Obsoletes: python-MarkupSafe < 0.15-2
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
38 %description -l pl.UTF-8
39 MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
40 pod kątem znaczników XML/HTML/XHTML.
42 %package -n python3-markupsafe
43 Summary: Implements a XML/HTML/XHTML Markup safe string for Python 3
44 Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 3 bezpieczny pod kątem znaczników XML/HTML/XHTML
45 Group: Development/Languages
46 Requires: python3-modules
48 %description -n python3-markupsafe
49 MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
51 %description -n python3-markupsafe -l pl.UTF-8
52 MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
53 pod kątem znaczników XML/HTML/XHTML.
56 %setup -q -n MarkupSafe-%{version}
60 %py_build %{?with_tests:test}
64 %py3_build %{?with_tests:test}
68 rm -rf $RPM_BUILD_ROOT
73 # C code errantly gets installed
74 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/markupsafe/_speedups.c
80 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c
84 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc LICENSE.rst README.rst
90 %dir %{py_sitedir}/markupsafe
91 %{py_sitedir}/markupsafe/*.py[co]
92 %attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
93 %{py_sitedir}/MarkupSafe-%{version}-py*.egg-info
97 %files -n python3-markupsafe
98 %defattr(644,root,root,755)
99 %doc LICENSE.rst README.rst
100 %dir %{py3_sitedir}/markupsafe
101 %{py3_sitedir}/markupsafe/*.py
102 %{py3_sitedir}/markupsafe/__pycache__
103 %attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
104 %{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info