]> git.pld-linux.org Git - packages/python-pluggy.git/blame - python-pluggy.spec
- disable pytest plugins
[packages/python-pluggy.git] / python-pluggy.spec
CommitLineData
5f61b62e 1#
1e47850e 2# Conditional build:
54f89123
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
1e47850e
MK
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module pluggy
9Summary: Plugin and hook calling mechanisms for Python
10Summary(pl.UTF-8): Mechanizmy wtyczek dla Pythona
11Name: python-%{module}
f386a100 12# keep 0.13.x here for python2 support
54f89123 13Version: 0.13.1
78a16753 14Release: 2
1e47850e
MK
15License: MIT
16Group: Libraries/Python
73aad6e5
JB
17#Source0Download: https://pypi.org/simple/pluggy/
18Source0: https://files.pythonhosted.org/packages/source/p/pluggy/pluggy-%{version}.tar.gz
54f89123 19# Source0-md5: 7f610e28b8b34487336b585a3dfb803d
73aad6e5 20URL: https://pypi.org/project/pluggy/
1e47850e
MK
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
73aad6e5 24BuildRequires: python-modules >= 1:2.7
6239e403 25BuildRequires: python-setuptools
54f89123 26BuildRequires: python-setuptools_scm
73aad6e5 27%if %{with tests}
54f89123 28BuildRequires: python-importlib_metadata >= 0.12
353810d8 29BuildRequires: python-pytest >= 3.7.0
73aad6e5 30%endif
1e47850e
MK
31%endif
32%if %{with python3}
73aad6e5 33BuildRequires: python3-modules >= 1:3.4
6239e403 34BuildRequires: python3-setuptools
54f89123 35BuildRequires: python3-setuptools_scm
73aad6e5 36%if %{with tests}
54f89123
JB
37%if "%{py3_ver}" < "3.8"
38BuildRequires: python3-importlib_metadata >= 0.12
39%endif
353810d8 40BuildRequires: python3-pytest >= 3.7.0
1e47850e 41%endif
73aad6e5 42%endif
54f89123
JB
43%if %{with doc}
44BuildRequires: sphinx-pdg
45%endif
73aad6e5 46Requires: python-modules >= 1:2.7
1e47850e
MK
47BuildArch: noarch
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%description
51Plugin manager as used by pytest but stripped of pytest specific
52details.
53
54%description -l pl.UTF-8
55Zarządca wtyczek tak jak używany przez pytest, ale pozbawiony detali
56specyficznych dla pytest.
57
58%package -n python3-%{module}
59Summary: Plugin and hook calling mechanisms for Python
60Summary(pl.UTF-8): Mechanizmy wtyczek dla Pythona
61Group: Libraries/Python
73aad6e5 62Requires: python3-modules >= 1:3.4
1e47850e
MK
63
64%description -n python3-%{module}
65Plugin manager as used by pytest but stripped of pytest specific
66details.
67
68%description -n python3-%{module} -l pl.UTF-8
69Zarządca wtyczek tak jak używany przez pytest, ale pozbawiony detali
70specyficznych dla pytest.
71
54f89123
JB
72%package apidocs
73Summary: API documentation for Python pluggy module
74Summary(pl.UTF-8): Dokumentacja API modułu Pythona pluggy
75Group: Documentation
76
77%description apidocs
78API documentation for Python pluggy module.
79
80%description apidocs -l pl.UTF-8
81Dokumentacja API modułu Pythona pluggy.
82
1e47850e
MK
83%prep
84%setup -q -n %{module}-%{version}
85
86%build
87%if %{with python2}
73aad6e5
JB
88%py_build
89
90%if %{with tests}
f386a100 91PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
54f89123 92PYTHONPATH=$(pwd)/src \
73aad6e5
JB
93%{__python} -m pytest testing
94%endif
1e47850e
MK
95%endif
96
97%if %{with python3}
73aad6e5 98%py3_build
1e47850e 99
73aad6e5 100%if %{with tests}
f386a100 101PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
54f89123 102PYTHONPATH=$(pwd)/src \
73aad6e5
JB
103%{__python3} -m pytest testing
104%endif
1e47850e
MK
105%endif
106
54f89123 107%if %{with doc}
f386a100
JB
108PYTHONPATH="$PWD/src" \
109sphinx-build -b html docs docs/_build/html
54f89123
JB
110%endif
111
1e47850e
MK
112%install
113rm -rf $RPM_BUILD_ROOT
73aad6e5 114
1e47850e
MK
115%if %{with python2}
116%py_install
73aad6e5 117
1e47850e
MK
118%py_postclean
119%endif
120
121%if %{with python3}
122%py3_install
123%endif
124
125%clean
126rm -rf $RPM_BUILD_ROOT
127
128%if %{with python2}
129%files
130%defattr(644,root,root,755)
73aad6e5
JB
131%doc LICENSE README.rst
132%{py_sitescriptdir}/pluggy
133%{py_sitescriptdir}/pluggy-%{version}-py*.egg-info
1e47850e 134%endif
1e47850e
MK
135
136%if %{with python3}
137%files -n python3-%{module}
138%defattr(644,root,root,755)
73aad6e5
JB
139%doc LICENSE README.rst
140%{py3_sitescriptdir}/pluggy
141%{py3_sitescriptdir}/pluggy-%{version}-py*.egg-info
1e47850e 142%endif
54f89123
JB
143
144%if %{with doc}
145%files apidocs
146%defattr(644,root,root,755)
147%doc docs/_build/html/{_modules,_static,*.html,*.js}
148%endif
This page took 0.209348 seconds and 4 git commands to generate.