]> git.pld-linux.org Git - SPECS.git/blob - python-pytest-black-multipy.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / python-pytest-black-multipy.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests (no tests in sources)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Allow '--black' on older Pythons
9 Summary(pl.UTF-8):      Dopuszczenie '--black' na starszych wersjach Pythona
10 Name:           python-pytest-black-multipy
11 Version:        1.0.1
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-black-multipy/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-black-multipy/pytest-black-multipy-%{version}.tar.gz
17 # Source0-md5:  4b6bf432b618c26178da323a782ee620
18 URL:            https://pypi.org/project/pytest-black-multipy/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools >= 1:31.0.1
22 BuildRequires:  python-setuptools_scm >= 1.15.0
23 %if %{with tests}
24 BuildRequires:  python-pytest >= 3.5
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.2
29 BuildRequires:  python3-setuptools >= 1:31.0.1
30 %if %{with tests}
31 BuildRequires:  python3-pytest >= 3.5
32 %if "%{py3_ver}" >= "3.6"
33 BuildRequires:  python3-pytest-black
34 %endif
35 %endif
36 %endif
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.714
39 %if %{with doc}
40 BuildRequires:  python-jaraco.packaging >= 3.2
41 BuildRequires:  python-rst.linker >= 1.9
42 BuildRequires:  sphinx-pdg-2
43 %endif
44 Requires:       python-modules >= 1:2.7
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 A wrapper around pytest-black to allow projects on older Python
50 versions to use the --black parameter.
51
52 This project is deprecated. Instead, use pytest-enabler to enable
53 black when present.
54
55 %description -l pl.UTF-8
56 Obudowanie wokół pytest-black, pozwalające na korzystanie z parametru
57 "--black" w projektach budowanych na starszych wersjach Pythona.
58
59 Ten projekt jest przestarzały. Lepiej używać modułu pytest-enabler,
60 abyt włączyć black, kiedy jest dostępny.
61
62 %package -n python3-pytest-black-multipy
63 Summary:        Allow '--black' on older Pythons
64 Summary(pl.UTF-8):      Dopuszczenie '--black' na starszych wersjach Pythona
65 Group:          Libraries/Python
66 Requires:       python3-modules >= 1:3.2
67
68 %description -n python3-pytest-black-multipy
69 A wrapper around pytest-black to allow projects on older Python
70 versions to use the --black parameter.
71
72 This project is deprecated. Instead, use pytest-enabler to enable
73 black when present.
74
75 %description -n python3-pytest-black-multipy -l pl.UTF-8
76 Obudowanie wokół pytest-black, pozwalające na korzystanie z parametru
77 "--black" w projektach budowanych na starszych wersjach Pythona.
78
79 Ten projekt jest przestarzały. Lepiej używać modułu pytest-enabler,
80 abyt włączyć black, kiedy jest dostępny.
81
82 %package apidocs
83 Summary:        API documentation for Python pytest-black-multipy module
84 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pytest-black-multipy
85 Group:          Documentation
86
87 %description apidocs
88 API documentation for Python pytest-black-multipy module.
89
90 %description apidocs -l pl.UTF-8
91 Dokumentacja API modułu Pythona pytest-black-multipy.
92
93 %prep
94 %setup -q -n pytest-black-multipy-%{version}
95
96 %build
97 %if %{with python2}
98 %py_build
99
100 %if %{with tests}
101 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
102 %{__python} -m pytest ...
103 %endif
104 %endif
105
106 %if %{with python3}
107 %py3_build
108
109 %if %{with tests}
110 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
111 %{__python3} -m pytest ...
112 %endif
113 %endif
114
115 %if %{with doc}
116 sphinx-build-2 -b html docs docs/_build/html
117 %endif
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with python2}
123 %py_install
124
125 %py_postclean
126 %endif
127
128 %if %{with python3}
129 %py3_install
130 %endif
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %if %{with python2}
136 %files
137 %defattr(644,root,root,755)
138 %doc CHANGES.rst LICENSE README.rst
139 %{py_sitescriptdir}/pytest_black_multipy
140 %{py_sitescriptdir}/pytest_black_multipy-%{version}-py*.egg-info
141 %endif
142
143 %if %{with python3}
144 %files -n python3-pytest-black-multipy
145 %defattr(644,root,root,755)
146 %doc CHANGES.rst LICENSE README.rst
147 %{py3_sitescriptdir}/pytest_black_multipy
148 %{py3_sitescriptdir}/pytest_black_multipy-%{version}-py*.egg-info
149 %endif
150
151 %if %{with doc}
152 %files apidocs
153 %defattr(644,root,root,755)
154 %doc docs/_build/html/{_static,*.html,*.js}
155 %endif
This page took 0.496556 seconds and 3 git commands to generate.