]>
Commit | Line | Data |
---|---|---|
8832f1be JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Sphinx extensions for working with LaTeX math | |
8 | Summary(pl.UTF-8): Rozszerzenia Sphinksa do pracy z LaTeXowymi wzorami matematycznymi | |
9 | Name: python-texext | |
10 | Version: 0.6.1 | |
25e47650 | 11 | Release: 3 |
8832f1be JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/texext/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/t/texext/texext-%{version}.tar.gz | |
16 | # Source0-md5: a8bf2d509afdbc1307a0e7bfc4bd3eaf | |
17 | URL: https://pypi.org/project/texext/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.7 | |
20 | BuildRequires: python-setuptools | |
21 | %if %{with tests} | |
22 | BuildRequires: python-Sphinx >= 1.3.1 | |
23 | BuildRequires: python-pytest | |
24 | BuildRequires: python-six | |
39326f2d | 25 | BuildRequires: python-sphinxtesters |
8832f1be JB |
26 | BuildRequires: python-sympy |
27 | %endif | |
28 | %endif | |
29 | %if %{with python3} | |
30 | BuildRequires: python3-modules >= 1:3.3 | |
31 | BuildRequires: python3-setuptools | |
32 | %if %{with tests} | |
33 | BuildRequires: python3-Sphinx >= 1.3.1 | |
34 | BuildRequires: python3-pytest | |
35 | BuildRequires: python3-six | |
39326f2d | 36 | BuildRequires: python3-sphinxtesters |
8832f1be JB |
37 | BuildRequires: python3-sympy |
38 | %endif | |
39 | %endif | |
40 | BuildRequires: rpm-pythonprov | |
41 | BuildRequires: rpmbuild(macros) >= 1.714 | |
42 | Requires: python-modules >= 1:2.7 | |
43 | BuildArch: noarch | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | texext contains a couple of Sphinx extensions for working with LaTeX | |
48 | math. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | texext zawiera kilka rozszerzeń Sphinksa do pracy z LaTeXowymi wzorami | |
52 | matematycznymi. | |
53 | ||
54 | %package -n python3-texext | |
55 | Summary: Sphinx extensions for working with LaTeX math | |
56 | Summary(pl.UTF-8): Rozszerzenia Sphinksa do pracy z LaTeXowymi wzorami matematycznymi | |
57 | Group: Libraries/Python | |
58 | Requires: python3-modules >= 1:3.3 | |
59 | ||
60 | %description -n python3-texext | |
61 | texext contains a couple of Sphinx extensions for working with LaTeX | |
62 | math. | |
63 | ||
64 | %description -n python3-texext -l pl.UTF-8 | |
65 | texext zawiera kilka rozszerzeń Sphinksa do pracy z LaTeXowymi wzorami | |
66 | matematycznymi. | |
67 | ||
68 | %prep | |
69 | %setup -q -n texext-%{version} | |
70 | ||
71 | %build | |
72 | %if %{with python2} | |
73 | %py_build | |
74 | ||
75 | %if %{with tests} | |
76 | PYTHONPATH=$(pwd)/build-2/lib \ | |
77 | %{__python} -m pytest texext/tests | |
78 | %endif | |
79 | %endif | |
80 | ||
81 | %if %{with python3} | |
82 | %py3_build | |
83 | ||
84 | %if %{with tests} | |
85 | PYTHONPATH=$(pwd)/build-2/lib \ | |
86 | %{__python3} -m pytest texext/tests | |
87 | %endif | |
88 | %endif | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %if %{with python2} | |
94 | %py_install | |
95 | ||
96 | %py_postclean | |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
100 | %py3_install | |
101 | %endif | |
102 | ||
103 | %clean | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %if %{with python2} | |
107 | %files | |
108 | %defattr(644,root,root,755) | |
109 | %doc LICENSE README.rst | |
110 | %{py_sitescriptdir}/texext | |
111 | %{py_sitescriptdir}/texext-%{version}-py*.egg-info | |
112 | %endif | |
113 | ||
114 | %if %{with python3} | |
115 | %files -n python3-texext | |
116 | %defattr(644,root,root,755) | |
117 | %doc LICENSE README.rst | |
118 | %{py3_sitescriptdir}/texext | |
119 | %{py3_sitescriptdir}/texext-%{version}-py*.egg-info | |
120 | %endif |