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