]> git.pld-linux.org Git - packages/python3-markupsafe.git/blame - python-markupsafe.spec
BR: rpmbuild(macros) >= 1.710
[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}
ba9d2fe0 11Version: 0.23
5be30e4a 12Release: 6
a79f2bec 13License: BSD
14Group: Development/Languages/Python
ba9d2fe0 15#Source0Download: https://pypi.python.org/pypi/MarkupSafe
02f65cc7 16Source0: https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
ba9d2fe0 17# Source0-md5: f5ab3deee4c37cd6a922fb81e730da6e
a79f2bec 18URL: http://www.pocoo.org/
a79f2bec 19BuildRequires: rpm-pythonprov
c7cf0f60 20BuildRequires: rpmbuild(macros) >= 1.710
d1b3c515
ER
21%if %{with python2}
22BuildRequires: python-devel
b15ed0c4 23BuildRequires: python-setuptools
d1b3c515
ER
24%endif
25%if %{with python3}
26BuildRequires: python-2to3
27BuildRequires: python3-devel
b15ed0c4 28BuildRequires: python3-setuptools
d1b3c515 29%endif
933a582b 30Requires: python-modules
a8646d2c
ER
31Provides: python-MarkupSafe = %{version}-%{release}
32Obsoletes: python-MarkupSafe < 0.15-2
a79f2bec 33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
02f65cc7
JB
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.
a79f2bec 41
d1b3c515 42%package -n python3-markupsafe
02f65cc7
JB
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
d1b3c515 45Group: Development/Languages
02f65cc7 46Requires: python3-modules
d1b3c515
ER
47
48%description -n python3-markupsafe
02f65cc7
JB
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.
d1b3c515 54
a79f2bec 55%prep
d1b3c515 56%setup -qc
a8646d2c 57mv MarkupSafe-%{version} py2
d1b3c515
ER
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
a79f2bec 65
66%build
d1b3c515
ER
67%if %{with python2}
68cd py3
a79f2bec 69# CFLAGS is only for arch packages - remove on noarch packages
e2092c77 70%py_build
d1b3c515
ER
71%{?with_tests:%{__python} setup.py test}
72cd ..
73%endif
74
75%if %{with python3}
76cd py3
e2092c77 77%py3_build
d1b3c515
ER
78%{?with_tests:%{__python3} setup.py test}
79cd ..
80%endif
a79f2bec 81
82%install
83rm -rf $RPM_BUILD_ROOT
d1b3c515
ER
84%if %{with python2}
85cd py2
e2092c77 86%py_install
a79f2bec 87
d1b3c515 88# C code errantly gets installed
be775773 89%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/markupsafe/_speedups.c
a79f2bec 90%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
91%py_comp $RPM_BUILD_ROOT%{py_sitedir}
92%py_postclean
d1b3c515
ER
93cd ..
94%endif
95
96%if %{with python3}
97cd py3
e2092c77 98%py3_install
d1b3c515
ER
99
100
d1b3c515
ER
101# C code errantly gets installed
102%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c
103cd ..
104%endif
a79f2bec 105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
d1b3c515 109%if %{with python2}
a79f2bec 110%files
111%defattr(644,root,root,755)
d1b3c515 112%doc AUTHORS LICENSE README.rst
933a582b 113%dir %{py_sitedir}/markupsafe
d1b3c515 114%{py_sitedir}/markupsafe/*.py[co]
02f65cc7 115%attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
d1b3c515
ER
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__
02f65cc7 126%attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
d1b3c515 127%{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info
a79f2bec 128%endif
This page took 0.072967 seconds and 4 git commands to generate.