]> git.pld-linux.org Git - packages/python3-markupsafe.git/blame - python-markupsafe.spec
- updated to 0.18
[packages/python3-markupsafe.git] / python-markupsafe.spec
CommitLineData
d1b3c515
ER
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
a8646d2c 7%define module markupsafe
02f65cc7
JB
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
a79f2bec 10Name: python-%{module}
02f65cc7
JB
11Version: 0.18
12Release: 1
a79f2bec 13License: BSD
14Group: Development/Languages/Python
02f65cc7
JB
15Source0: https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
16# Source0-md5: f8d252fd05371e51dec2fe9a36890687
a79f2bec 17URL: http://www.pocoo.org/
a79f2bec 18BuildRequires: rpm-pythonprov
a79f2bec 19BuildRequires: rpmbuild(macros) >= 1.219
d1b3c515
ER
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
933a582b 29Requires: python-modules
a8646d2c
ER
30Provides: python-MarkupSafe = %{version}-%{release}
31Obsoletes: python-MarkupSafe < 0.15-2
a79f2bec 32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
02f65cc7
JB
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.
a79f2bec 40
d1b3c515 41%package -n python3-markupsafe
02f65cc7
JB
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
d1b3c515 44Group: Development/Languages
02f65cc7 45Requires: python3-modules
d1b3c515
ER
46
47%description -n python3-markupsafe
02f65cc7
JB
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.
d1b3c515 53
a79f2bec 54%prep
d1b3c515 55%setup -qc
a8646d2c 56mv MarkupSafe-%{version} py2
d1b3c515
ER
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
a79f2bec 64
65%build
d1b3c515
ER
66%if %{with python2}
67cd py3
a79f2bec 68# CFLAGS is only for arch packages - remove on noarch packages
be775773
ER
69CC="%{__cc}" \
70CFLAGS="%{rpmcflags}" \
a79f2bec 71%{__python} setup.py build
d1b3c515
ER
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
a79f2bec 84
85%install
86rm -rf $RPM_BUILD_ROOT
d1b3c515
ER
87%if %{with python2}
88cd py2
a79f2bec 89%{__python} setup.py install \
90 --optimize=2 \
91 --root=$RPM_BUILD_ROOT
92
d1b3c515 93# C code errantly gets installed
be775773 94%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/markupsafe/_speedups.c
a79f2bec 95%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
96%py_comp $RPM_BUILD_ROOT%{py_sitedir}
97%py_postclean
d1b3c515
ER
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
d1b3c515
ER
108# C code errantly gets installed
109%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c
110cd ..
111%endif
a79f2bec 112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
d1b3c515 116%if %{with python2}
a79f2bec 117%files
118%defattr(644,root,root,755)
d1b3c515 119%doc AUTHORS LICENSE README.rst
933a582b 120%dir %{py_sitedir}/markupsafe
d1b3c515 121%{py_sitedir}/markupsafe/*.py[co]
02f65cc7 122%attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
d1b3c515
ER
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__
02f65cc7 133%attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
d1b3c515 134%{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info
a79f2bec 135%endif
This page took 0.090573 seconds and 4 git commands to generate.