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