]> git.pld-linux.org Git - packages/python3-markupsafe.git/blame - python-markupsafe.spec
- release 2 (by relup.sh)
[packages/python3-markupsafe.git] / python-markupsafe.spec
CommitLineData
d1b3c515
ER
1#
2# Conditional build:
f17806b5 3%bcond_without doc # Sphinx documentation
37cbba9f 4%bcond_without tests # unit tests
d1b3c515
ER
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
a8646d2c 8%define module markupsafe
02f65cc7
JB
9Summary: MarkupSafe - a XML/HTML/XHTML Markup safe string for Python 2
10Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 2 bezpieczny pod kątem znaczników XML/HTML/XHTML
a79f2bec 11Name: python-%{module}
f17806b5 12Version: 1.1.1
24aacecc 13Release: 2
a79f2bec 14License: BSD
15Group: Development/Languages/Python
f17806b5 16#Source0Download: https://pypi.org/simple/markupsafe/
4cbda2d2 17Source0: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
f17806b5 18# Source0-md5: 43fd756864fe42063068e092e220c57b
4cbda2d2 19URL: http://www.pocoo.org/projects/markupsafe/#markupsafe
a79f2bec 20BuildRequires: rpm-pythonprov
f17806b5 21BuildRequires: rpmbuild(macros) >= 1.714
d1b3c515 22%if %{with python2}
f17806b5 23BuildRequires: python-devel >= 1:2.7
b15ed0c4 24BuildRequires: python-setuptools
f17806b5
JB
25%if %{with tests}
26BuildRequires: python-pytest
27%endif
d1b3c515
ER
28%endif
29%if %{with python3}
30BuildRequires: python-2to3
f17806b5 31BuildRequires: python3-devel >= 1:3.4
b15ed0c4 32BuildRequires: python3-setuptools
f17806b5
JB
33%if %{with tests}
34BuildRequires: python3-pytest
35%endif
d1b3c515 36%endif
f17806b5
JB
37%if %{with doc}
38BuildRequires: python3-pallets-sphinx-themes >= 1.1.0
39# docs/requirements.txt says 1.8.0, but 1.7.6 also works
40#BuildRequires: sphinx-pdg-3 >= 1.8.0
41BuildRequires: sphinx-pdg-3 >= 1.7.0
42%endif
43Requires: python-modules >= 1:2.7
a8646d2c
ER
44Provides: python-MarkupSafe = %{version}-%{release}
45Obsoletes: python-MarkupSafe < 0.15-2
a79f2bec 46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
02f65cc7
JB
49MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
50
51%description -l pl.UTF-8
52MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
53pod kątem znaczników XML/HTML/XHTML.
a79f2bec 54
d1b3c515 55%package -n python3-markupsafe
02f65cc7
JB
56Summary: Implements a XML/HTML/XHTML Markup safe string for Python 3
57Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 3 bezpieczny pod kątem znaczników XML/HTML/XHTML
d1b3c515 58Group: Development/Languages
f17806b5 59Requires: python3-modules >= 1:3.4
d1b3c515
ER
60
61%description -n python3-markupsafe
02f65cc7
JB
62MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
63
64%description -n python3-markupsafe -l pl.UTF-8
65MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
66pod kątem znaczników XML/HTML/XHTML.
d1b3c515 67
f17806b5
JB
68%package apidocs
69Summary: API documentation for Python MarkupSafe module
70Summary(pl.UTF-8): Dokumentacja API modułu Pythona MarkupSafe
71Group: Documentation
72
73%description apidocs
74API documentation for Python MarkupSafe module.
75
76%description apidocs -l pl.UTF-8
77Dokumentacja API modułu Pythona MarkupSafe.
78
a79f2bec 79%prep
4cbda2d2 80%setup -q -n MarkupSafe-%{version}
a79f2bec 81
82%build
d1b3c515 83%if %{with python2}
f17806b5
JB
84%py_build
85
86%if %{with tests}
87PYTHONPATH=$(pwd)/$(echo build-2/lib.*) \
88%{__python} -m pytest tests
89%endif
d1b3c515
ER
90%endif
91
92%if %{with python3}
f17806b5
JB
93%py3_build
94
95%if %{with tests}
96PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \
97%{__python3} -m pytest tests
98%endif
99%endif
100
101%if %{with doc}
102%{__make} -C docs html \
103 SPHINXBUILD=sphinx-build-3
d1b3c515 104%endif
a79f2bec 105
106%install
107rm -rf $RPM_BUILD_ROOT
f17806b5 108
d1b3c515 109%if %{with python2}
e2092c77 110%py_install
a79f2bec 111
4cbda2d2 112%py_postclean
d1b3c515 113# C code errantly gets installed
be775773 114%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/markupsafe/_speedups.c
d1b3c515
ER
115%endif
116
117%if %{with python3}
e2092c77 118%py3_install
d1b3c515 119
d1b3c515 120%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c
d1b3c515 121%endif
a79f2bec 122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
d1b3c515 126%if %{with python2}
a79f2bec 127%files
128%defattr(644,root,root,755)
f17806b5 129%doc CHANGES.rst LICENSE.rst README.rst
933a582b 130%dir %{py_sitedir}/markupsafe
d1b3c515 131%{py_sitedir}/markupsafe/*.py[co]
02f65cc7 132%attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
d1b3c515
ER
133%{py_sitedir}/MarkupSafe-%{version}-py*.egg-info
134%endif
135
136%if %{with python3}
137%files -n python3-markupsafe
138%defattr(644,root,root,755)
f17806b5 139%doc CHANGES.rst LICENSE.rst README.rst
d1b3c515
ER
140%dir %{py3_sitedir}/markupsafe
141%{py3_sitedir}/markupsafe/*.py
142%{py3_sitedir}/markupsafe/__pycache__
02f65cc7 143%attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
d1b3c515 144%{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info
a79f2bec 145%endif
f17806b5
JB
146
147%if %{with doc}
148%files apidocs
149%defattr(644,root,root,755)
150%doc docs/_build/html/{_static,*.html,*.js}
151%endif
This page took 0.08627 seconds and 4 git commands to generate.