]> git.pld-linux.org Git - packages/python-pluggy.git/blob - python-pluggy.spec
d4027c2c4d2c03db25152a512acab41c744f2f33
[packages/python-pluggy.git] / python-pluggy.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pluggy
8 Summary:        Plugin and hook calling mechanisms for Python
9 Summary(pl.UTF-8):      Mechanizmy wtyczek dla Pythona
10 Name:           python-%{module}
11 Version:        0.8.0
12 Release:        2
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pluggy/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pluggy/pluggy-%{version}.tar.gz
17 # Source0-md5:  12ddd25322d909a286c4018d18fddc79
18 URL:            https://pypi.org/project/pluggy/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-pytest >= 3.7.0
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.4
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-pytest >= 3.7.0
33 %endif
34 %endif
35 Requires:       python-modules >= 1:2.7
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Plugin manager as used by pytest but stripped of pytest specific
41 details.
42
43 %description -l pl.UTF-8
44 Zarządca wtyczek tak jak używany przez pytest, ale pozbawiony detali
45 specyficznych dla pytest.
46
47 %package -n python3-%{module}
48 Summary:        Plugin and hook calling mechanisms for Python
49 Summary(pl.UTF-8):      Mechanizmy wtyczek dla Pythona
50 Group:          Libraries/Python
51 Requires:       python3-modules >= 1:3.4
52
53 %description -n python3-%{module}
54 Plugin manager as used by pytest but stripped of pytest specific
55 details.
56
57 %description -n python3-%{module} -l pl.UTF-8
58 Zarządca wtyczek tak jak używany przez pytest, ale pozbawiony detali
59 specyficznych dla pytest.
60
61 %prep
62 %setup -q -n %{module}-%{version}
63
64 %build
65 %if %{with python2}
66 %py_build
67
68 %if %{with tests}
69 %{__python} -m pytest testing
70 %endif
71 %endif
72
73 %if %{with python3}
74 %py3_build
75
76 %if %{with tests}
77 %{__python3} -m pytest testing
78 %endif
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %py_install
86
87 %py_postclean
88 %endif
89
90 %if %{with python3}
91 %py3_install
92 %endif
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %files
99 %defattr(644,root,root,755)
100 %doc LICENSE README.rst
101 %{py_sitescriptdir}/pluggy
102 %{py_sitescriptdir}/pluggy-%{version}-py*.egg-info
103 %endif
104
105 %if %{with python3}
106 %files -n python3-%{module}
107 %defattr(644,root,root,755)
108 %doc LICENSE README.rst
109 %{py3_sitescriptdir}/pluggy
110 %{py3_sitescriptdir}/pluggy-%{version}-py*.egg-info
111 %endif
This page took 0.043617 seconds and 2 git commands to generate.