]> git.pld-linux.org Git - packages/python-pytest-flake8.git/blob - python-pytest-flake8.spec
rebuild with python 3.10
[packages/python-pytest-flake8.git] / python-pytest-flake8.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # py.test tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        py.test plugin to check FLAKE8 requirements
8 Summary(pl.UTF-8):      Wtyczka py.test do sprawdzania wymagań FLAKE8
9 Name:           python-pytest-flake8
10 # keep 1.0.x here for python2 support
11 Version:        1.0.7
12 Release:        3
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-flake8/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-flake8/pytest-flake8-%{version}.tar.gz
17 # Source0-md5:  e50df912c25866bfcb1a7266d6e266ef
18 URL:            https://github.com/tholo/pytest-flake8
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-flake8 >= 3.5
24 BuildRequires:  python-pytest >= 3.5
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-flake8 >= 3.5
32 BuildRequires:  python3-pytest >= 3.5
33 %endif
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 Requires:       python-modules >= 1:2.7
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 py.test plugin for efficiently checking PEP8 compliance.
43
44 %description -l pl.UTF-8
45 Wtyczka py.test do efektywnego sprawdzania zgodności z PEP8.
46
47 %package -n python3-pytest-flake8
48 Summary:        py.test plugin to check FLAKE8 requirements
49 Summary(pl.UTF-8):      Wtyczka py.test do sprawdzania wymagań FLAKE8
50 Group:          Libraries/Python
51 Requires:       python3-modules >= 1:3.4
52
53 %description -n python3-pytest-flake8
54 py.test plugin for efficiently checking PEP8 compliance.
55
56 %description -n python3-pytest-flake8 -l pl.UTF-8
57 Wtyczka py.test do efektywnego sprawdzania zgodności z PEP8.
58
59 %prep
60 %setup -q -n pytest-flake8-%{version}
61
62 %build
63 %if %{with python2}
64 %py_build
65
66 %if %{with tests}
67 PYTHONPATH=$(pwd) \
68 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
69 PYTEST_PLUGINS="pytest_flake8" \
70 %{__python} -m pytest
71 %endif
72 %endif
73
74 %if %{with python3}
75 %py3_build
76
77 %if %{with tests}
78 PYTHONPATH=$(pwd) \
79 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
80 PYTEST_PLUGINS="pytest_flake8" \
81 %{__python3} -m pytest
82 %endif
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %py_install
90
91 %py_postclean
92 %endif
93
94 %if %{with python3}
95 %py3_install
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %files
103 %defattr(644,root,root,755)
104 %doc CHANGELOG LICENSE README.rst
105 %{py_sitescriptdir}/pytest_flake8.py[co]
106 %{py_sitescriptdir}/pytest_flake8-%{version}-py*.egg-info
107 %endif
108
109 %if %{with python3}
110 %files -n python3-pytest-flake8
111 %defattr(644,root,root,755)
112 %doc CHANGELOG LICENSE README.rst
113 %{py3_sitescriptdir}/pytest_flake8.py
114 %{py3_sitescriptdir}/__pycache__/pytest_flake8.cpython-*.py[co]
115 %{py3_sitescriptdir}/pytest_flake8-%{version}-py*.egg-info
116 %endif
This page took 0.055963 seconds and 3 git commands to generate.