]>
Commit | Line | Data |
---|---|---|
e1d3c87e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: A pygments lexer for pytest output | |
7 | Summary(pl.UTF-8): Lexer pygments do wyjścia pytesta | |
8 | Name: python-pygments_pytest | |
9 | # keep 1.x here for python2 support | |
10 | Version: 1.3.1 | |
11 | Release: 1 | |
12 | License: MIT | |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/pygments-pytest/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/p/pygments-pytest/pygments_pytest-%{version}.tar.gz | |
16 | # Source0-md5: e51a2e259bfd4eb4f93fc4f626e05e17 | |
17 | URL: https://pypi.org/project/pygments-pytest/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.5 | |
20 | BuildRequires: python-setuptools | |
21 | %endif | |
22 | %if %{with python3} | |
23 | BuildRequires: python3-modules >= 1:3.2 | |
24 | BuildRequires: python3-setuptools | |
25 | %endif | |
26 | BuildRequires: rpm-pythonprov | |
27 | BuildRequires: rpmbuild(macros) >= 1.714 | |
28 | Requires: python-modules >= 1:2.5 | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | This library provides a pygments lexer called pytest. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Ta biblioteka udostępnia lexer pygments o nazwie pytest. | |
37 | ||
38 | %package -n python3-pygments_pytest | |
39 | Summary: A pygments lexer for pytest output | |
40 | Summary(pl.UTF-8): Lexer pygments do wyjścia pytesta | |
41 | Group: Libraries/Python | |
42 | Requires: python3-modules >= 1:3.2 | |
43 | ||
44 | %description -n python3-pygments_pytest | |
45 | This library provides a pygments lexer called pytest. | |
46 | ||
47 | %description -n python3-pygments_pytest -l pl.UTF-8 | |
48 | Ta biblioteka udostępnia lexer pygments o nazwie pytest. | |
49 | ||
50 | %prep | |
51 | %setup -q -n pygments_pytest-%{version} | |
52 | ||
53 | %build | |
54 | %if %{with python2} | |
55 | %py_build | |
56 | %endif | |
57 | ||
58 | %if %{with python3} | |
59 | %py3_build | |
60 | %endif | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %if %{with python2} | |
66 | %py_install | |
67 | ||
68 | %py_postclean | |
69 | %endif | |
70 | ||
71 | %if %{with python3} | |
72 | %py3_install | |
73 | %endif | |
74 | ||
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %if %{with python2} | |
79 | %files | |
80 | %defattr(644,root,root,755) | |
81 | %doc LICENSE README.md | |
82 | %{py_sitescriptdir}/pygments_pytest.py[co] | |
83 | %{py_sitescriptdir}/pygments_pytest-%{version}-py*.egg-info | |
84 | %endif | |
85 | ||
86 | %if %{with python3} | |
87 | %files -n python3-pygments_pytest | |
88 | %defattr(644,root,root,755) | |
89 | %doc LICENSE README.md | |
90 | %{py3_sitescriptdir}/pygments_pytest.py | |
91 | %{py3_sitescriptdir}/__pycache__/pygments_pytest.cpython-*.py[co] | |
92 | %{py3_sitescriptdir}/pygments_pytest-%{version}-py*.egg-info | |
93 | %endif |