]>
Commit | Line | Data |
---|---|---|
96a5e342 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # do not perform "make test" | |
4 | %bcond_without python2 # CPython 2.x module | |
5c637730 | 5 | %bcond_without python3 # CPython 3.x module |
96a5e342 ER |
6 | |
7 | %define module stevedore | |
8 | Summary: Manage dynamic plugins for Python applications | |
9 | Name: python-%{module} | |
5c637730 | 10 | Version: 1.25.0 |
647a7d34 | 11 | Release: 2 |
96a5e342 ER |
12 | License: Apache v2.0 |
13 | Group: Development/Languages | |
5c637730 JK |
14 | Source0: https://pypi.python.org/packages/08/58/e21f4691e8e75a290bdbfa366f06b9403c653642ef31f879e07f6f9ad7db/stevedore-1.25.0.tar.gz |
15 | # Source0-md5: 8de5610a69f8066191d3e4b9af82c437 | |
16 | URL: https://pypi.python.org/pypi/stevedore | |
96a5e342 | 17 | BuildRequires: rpm-pythonprov |
cd1d1300 | 18 | BuildRequires: rpmbuild(macros) >= 1.710 |
96a5e342 ER |
19 | %if %{with python2} |
20 | BuildRequires: python-setuptools | |
5c637730 | 21 | BuildRequires: python-pbr >= 2.0.0 |
96a5e342 | 22 | %if %{with tests} |
5c637730 JK |
23 | BuildRequires: python-six >= 1.9.0 |
24 | BuildRequires: python-pillow >= 2.4.0 | |
25 | BuildRequires: sphinx-pdg-2 >= 1.6.2 | |
26 | BuildRequires: python-mock >= 2.0 | |
27 | BuildRequires: python-coverage >=4.0 | |
28 | BuildRequires: python-testrepository >= 0.0.18 | |
29 | BuildRequires: python-openstackdocstheme >=1.11.0 | |
30 | BuildRequires: python-reno >=1.8.0 | |
96a5e342 ER |
31 | %endif |
32 | %endif | |
33 | %if %{with python3} | |
96a5e342 | 34 | BuildRequires: python3-setuptools |
5c637730 JK |
35 | BuildRequires: python3-pbr >= 2.0.0 |
36 | %if %{with tests} | |
37 | BuildRequires: python3-six >= 1.9.0 | |
38 | BuildRequires: python3-pillow >= 2.4.0 | |
39 | BuildRequires: sphinx-pdg-3 >= 1.6.2 | |
40 | BuildRequires: python3-mock >= 2.0 | |
41 | BuildRequires: python3-coverage >=4.0 | |
42 | BuildRequires: python3-testrepository >= 0.0.18 | |
43 | BuildRequires: python3-openstackdocstheme >=1.11.0 | |
44 | BuildRequires: python3-reno >=1.8.0 | |
45 | %endif | |
96a5e342 ER |
46 | %endif |
47 | Requires: python-setuptools | |
48 | Requires: python-six | |
49 | BuildArch: noarch | |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
51 | ||
52 | %description | |
53 | Manage dynamic plugins for Python applications | |
54 | ||
55 | %package -n python3-stevedore | |
56 | Summary: Manage dynamic plugins for Python applications | |
57 | Group: Development/Libraries | |
58 | Requires: python3-setuptools | |
59 | Requires: python3-six | |
60 | ||
61 | %description -n python3-stevedore | |
62 | Manage dynamic plugins for Python applications | |
63 | ||
64 | %prep | |
65 | %setup -q -n stevedore-%{version} | |
66 | ||
67 | %build | |
68 | %if %{with python2} | |
5c637730 | 69 | %py_build %{?with_tests:test} |
96a5e342 ER |
70 | %endif |
71 | ||
72 | %if %{with python3} | |
87ab386f | 73 | %py3_build %{?with_tests:test} |
96a5e342 ER |
74 | %endif |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %if %{with python2} | |
87ab386f | 80 | %py_install |
96a5e342 | 81 | |
2a313414 | 82 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/stevedore/tests |
c552d429 | 83 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/stevedore/example |
2a313414 | 84 | |
96a5e342 ER |
85 | %py_postclean |
86 | %endif | |
87 | ||
88 | %if %{with python3} | |
87ab386f | 89 | %py3_install |
2a313414 ER |
90 | |
91 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/stevedore/tests | |
c552d429 | 92 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/stevedore/example |
96a5e342 ER |
93 | %endif |
94 | ||
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc README.rst LICENSE | |
102 | %{py_sitescriptdir}/stevedore | |
103 | %{py_sitescriptdir}/stevedore-%{version}-py*.egg-info | |
104 | %endif | |
105 | ||
106 | %if %{with python3} | |
107 | %files -n python3-stevedore | |
108 | %defattr(644,root,root,755) | |
109 | %doc README.rst LICENSE | |
110 | %{py3_sitescriptdir}/stevedore | |
111 | %{py3_sitescriptdir}/stevedore-%{version}-py*.egg-info | |
112 | %endif |