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