]> git.pld-linux.org Git - packages/python-jinja2.git/blame - python-jinja2.spec
- updated URL, versioned Obsoletes
[packages/python-jinja2.git] / python-jinja2.spec
CommitLineData
bd8c7cd4
JB
1#
2# Conditional build:
3%bcond_without doc # API documentation
1cb8c72c 4%bcond_without tests # unit tests
bd8c7cd4 5%bcond_without python2 # Python 2.x modules
4d1855ce 6%bcond_with python3 # Python 3.x modules, python3 is built from python3-jinja2.spec
22da3d42
ER
7
8%define module jinja2
bd8c7cd4
JB
9Summary: Jinja2 Template engine for Python 2.x
10Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 2.x
32bc8461 11Name: python-%{module}
c968238f
JP
12Version: 2.11.3
13Release: 1
32bc8461
MK
14License: BSD
15Group: Development/Languages/Python
6fb399b6 16#Source0Download: https://pypi.org/simple/Jinja2
50bf5fce 17Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
c968238f 18# Source0-md5: 231dc00d34afb2672c497713fa9cdaaa
0624055f 19URL: https://jinja.palletsprojects.com/
7de1498d 20BuildRequires: rpmbuild(macros) >= 1.714
196bf8af 21BuildRequires: rpm-pythonprov
63775cd9 22%if %{with python2}
1cb8c72c 23BuildRequires: python-devel >= 1:2.7
de2c695c 24BuildRequires: python-setuptools
1cb8c72c
JB
25%if %{with tests}
26BuildRequires: python-markupsafe >= 0.23
27BuildRequires: python-pytest
28%endif
63775cd9
AF
29%endif
30%if %{with python3}
1cb8c72c
JB
31BuildRequires: python3-devel >= 1:3.5
32BuildRequires: python3-modules >= 1:3.5
f1a9449f 33BuildRequires: python3-setuptools
1cb8c72c
JB
34%if %{with tests}
35BuildRequires: python3-markupsafe >= 0.23
36BuildRequires: python3-pytest
37%endif
63775cd9 38%endif
bb2732e3 39%if %{with doc}
d630e4b9
JB
40BuildRequires: python3-pallets-sphinx-themes >= 1.2.0
41BuildRequires: python3-sphinxcontrib-log-cabinet >= 1.0.1
42BuildRequires: python3-sphinx_issues >= 1.2.0
43BuildRequires: sphinx-pdg-3 >= 2.1.2
bb2732e3 44%endif
1cb8c72c 45Requires: python-modules >= 1:2.7
0624055f 46Obsoletes: python-Jinja2 < 2.7
22da3d42 47BuildArch: noarch
32bc8461
MK
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%description
51A small but fast and easy to use stand-alone template engine written
bd8c7cd4 52in pure Python. Provides a Django inspired non-XML syntax but supports
32bc8461
MK
53inline expressions and an optional sandboxed environment.
54
32bc8461 55%description -l pl.UTF-8
bd8c7cd4
JB
56Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany
57w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
58składni i kompilowane do kodu Pythona szablony w opcjonalnie
32bc8461
MK
59ograniczonym środowisku.
60
63775cd9 61%package -n python3-%{module}
bd8c7cd4 62Summary: Template engine Jinja2 for Python 3.x
22da3d42
ER
63Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x
64Group: Development/Languages/Python
1cb8c72c 65Requires: python3-modules >= 1:3.5
63775cd9 66
5742e286 67%description -n python3-%{module}
63775cd9 68A small but fast and easy to use stand-alone template engine written
bd8c7cd4 69in pure Python. Provides a Django inspired non-XML syntax but supports
63775cd9
AF
70inline expressions and an optional sandboxed environment.
71
72%description -n python3-%{module} -l pl.UTF-8
bd8c7cd4
JB
73Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany
74w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
75składni i kompilowane do kodu Pythona szablony w opcjonalnie
63775cd9
AF
76ograniczonym środowisku.
77
78%package apidoc
79Summary: Jinja2 template engine API documentation
bd8c7cd4 80Summary(pl.UTF-8): Dokumentacja API silnika szablonów Jinja2
22da3d42 81Group: Development/Languages/Python
63775cd9
AF
82
83%description apidoc
bd8c7cd4
JB
84API documentation for Jinja2 template engine.
85
86%description apidoc -l pl.UTF-8
87Dokumentacja API silnika szablonów Jinja2.
63775cd9 88
32bc8461
MK
89%prep
90%setup -q -n Jinja2-%{version}
91
92%build
63775cd9 93%if %{with python2}
d831097c 94%py_build
1cb8c72c
JB
95
96%if %{with tests}
d630e4b9 97PYTHONPATH=$(pwd)/src \
1cb8c72c
JB
98%{__python} -m pytest tests
99%endif
63775cd9 100%endif
1cb8c72c 101
63775cd9 102%if %{with python3}
d831097c 103%py3_build
1cb8c72c
JB
104
105%if %{with tests}
d630e4b9 106PYTHONPATH=$(pwd)/src \
1cb8c72c
JB
107%{__python3} -m pytest tests
108%endif
63775cd9
AF
109%endif
110
bb2732e3 111%if %{with doc}
6fb399b6
JB
112PYTHONPATH=$(pwd) \
113%{__make} -C docs -j1 html \
94e1f0ec 114 SPHINXBUILD=sphinx-build-3
bb2732e3 115%endif
32bc8461
MK
116
117%install
118rm -rf $RPM_BUILD_ROOT
119
63775cd9 120%if %{with python2}
d831097c 121%py_install
32bc8461
MK
122
123%py_postclean
63775cd9
AF
124%endif
125
126%if %{with python3}
d831097c 127%py3_install
63775cd9 128%endif
32bc8461
MK
129
130%clean
131rm -rf $RPM_BUILD_ROOT
132
63775cd9 133%if %{with python2}
32bc8461
MK
134%files
135%defattr(644,root,root,755)
1cb8c72c 136%doc CHANGES.rst LICENSE.rst README.rst
63775cd9 137%{py_sitescriptdir}/%{module}
bd8c7cd4 138%{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info
63775cd9
AF
139%endif
140
141%if %{with python3}
142%files -n python3-%{module}
143%defattr(644,root,root,755)
1cb8c72c 144%doc CHANGES.rst LICENSE.rst README.rst
63775cd9 145%{py3_sitescriptdir}/%{module}
bd8c7cd4 146%{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
63775cd9
AF
147%endif
148
bb2732e3 149%if %{with doc}
63775cd9
AF
150%files apidoc
151%defattr(644,root,root,755)
6fb399b6 152%doc docs/_build/html/{_static,*.html,*.js}
bb2732e3 153%endif
This page took 0.086729 seconds and 4 git commands to generate.