]> git.pld-linux.org Git - packages/python3-markupsafe.git/blame_incremental - python-markupsafe.spec
BR: rpmbuild(macros) >= 1.710
[packages/python3-markupsafe.git] / python-markupsafe.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module markupsafe
8Summary: MarkupSafe - a XML/HTML/XHTML Markup safe string for Python 2
9Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 2 bezpieczny pod kątem znaczników XML/HTML/XHTML
10Name: python-%{module}
11Version: 0.23
12Release: 6
13License: BSD
14Group: Development/Languages/Python
15#Source0Download: https://pypi.python.org/pypi/MarkupSafe
16Source0: https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
17# Source0-md5: f5ab3deee4c37cd6a922fb81e730da6e
18URL: http://www.pocoo.org/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.710
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python-2to3
27BuildRequires: python3-devel
28BuildRequires: python3-setuptools
29%endif
30Requires: python-modules
31Provides: python-MarkupSafe = %{version}-%{release}
32Obsoletes: python-MarkupSafe < 0.15-2
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
37
38%description -l pl.UTF-8
39MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
40pod kątem znaczników XML/HTML/XHTML.
41
42%package -n python3-markupsafe
43Summary: Implements a XML/HTML/XHTML Markup safe string for Python 3
44Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 3 bezpieczny pod kątem znaczników XML/HTML/XHTML
45Group: Development/Languages
46Requires: python3-modules
47
48%description -n python3-markupsafe
49MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
50
51%description -n python3-markupsafe -l pl.UTF-8
52MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
53pod kątem znaczników XML/HTML/XHTML.
54
55%prep
56%setup -qc
57mv MarkupSafe-%{version} py2
58# for %doc
59cp -p py2/{AUTHORS,LICENSE,README.rst} .
60
61%if %{with python3}
62cp -a py2 py3
632to3 --write --nobackups py3
64%endif
65
66%build
67%if %{with python2}
68cd py3
69# CFLAGS is only for arch packages - remove on noarch packages
70%py_build
71%{?with_tests:%{__python} setup.py test}
72cd ..
73%endif
74
75%if %{with python3}
76cd py3
77%py3_build
78%{?with_tests:%{__python3} setup.py test}
79cd ..
80%endif
81
82%install
83rm -rf $RPM_BUILD_ROOT
84%if %{with python2}
85cd py2
86%py_install
87
88# C code errantly gets installed
89%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/markupsafe/_speedups.c
90%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
91%py_comp $RPM_BUILD_ROOT%{py_sitedir}
92%py_postclean
93cd ..
94%endif
95
96%if %{with python3}
97cd py3
98%py3_install
99
100
101# C code errantly gets installed
102%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c
103cd ..
104%endif
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python2}
110%files
111%defattr(644,root,root,755)
112%doc AUTHORS LICENSE README.rst
113%dir %{py_sitedir}/markupsafe
114%{py_sitedir}/markupsafe/*.py[co]
115%attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
116%{py_sitedir}/MarkupSafe-%{version}-py*.egg-info
117%endif
118
119%if %{with python3}
120%files -n python3-markupsafe
121%defattr(644,root,root,755)
122%doc AUTHORS LICENSE README.rst
123%dir %{py3_sitedir}/markupsafe
124%{py3_sitedir}/markupsafe/*.py
125%{py3_sitedir}/markupsafe/__pycache__
126%attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
127%{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info
128%endif
This page took 0.026758 seconds and 4 git commands to generate.