]> git.pld-linux.org Git - packages/python-stevedore.git/blame - python-stevedore.spec
automatic change: use py_build/py_install macros
[packages/python-stevedore.git] / python-stevedore.spec
CommitLineData
96a5e342
ER
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_with python3 # CPython 3.x module
6
7%define module stevedore
8Summary: Manage dynamic plugins for Python applications
9Name: python-%{module}
10Version: 1.1.0
11Release: 1
12License: Apache v2.0
13Group: Development/Languages
14Source0: http://pypi.python.org/packages/source/s/stevedore/stevedore-%{version}.tar.gz
15# Source0-md5: b7f30055c32410f8f9b6cf1b55bdc68a
16URL: https://github.com/dreamhost/stevedore
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.219
19%if %{with python2}
20BuildRequires: python-setuptools
21%if %{with tests}
22#BuildRequires: python-discover
23BuildRequires: python-mock
24#BuildRequires: python-oslotest
25BuildRequires: python-pbr
26BuildRequires: python-six
27BuildRequires: python-testrepository
28%endif
29%endif
30%if %{with python3}
31BuildRequires: python3-devel
32#BuildRequires: python3-discover
33BuildRequires: python3-mock
34#BuildRequires: python3-oslotest
35BuildRequires: python3-pbr
36BuildRequires: python3-setuptools
37BuildRequires: python3-six
38#BuildRequires: python3-testrepository
39%endif
40Requires: python-setuptools
41Requires: python-six
42BuildArch: noarch
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46Manage dynamic plugins for Python applications
47
48%package -n python3-stevedore
49Summary: Manage dynamic plugins for Python applications
50Group: Development/Libraries
51Requires: python3-setuptools
52Requires: python3-six
53
54%description -n python3-stevedore
55Manage dynamic plugins for Python applications
56
57%prep
58%setup -q -n stevedore-%{version}
59
60%build
61%if %{with python2}
87ab386f 62%py_build
96a5e342
ER
63
64%if %{with tests}
65PYTHONPATH=. nosetests-%{py_ver}
66%endif
67%endif
68
69%if %{with python3}
87ab386f 70%py3_build %{?with_tests:test}
96a5e342
ER
71
72%if %{with tests}
73PYTHONPATH=. nosetests-%{py3_ver}
74%endif
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
87ab386f 81%py_install
96a5e342 82
2a313414 83%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/stevedore/tests
c552d429 84%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/stevedore/example
2a313414 85
96a5e342
ER
86%py_postclean
87%endif
88
89%if %{with python3}
87ab386f 90%py3_install
2a313414
ER
91
92%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/stevedore/tests
c552d429 93%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/stevedore/example
96a5e342
ER
94%endif
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%if %{with python2}
100%files
101%defattr(644,root,root,755)
102%doc README.rst LICENSE
103%{py_sitescriptdir}/stevedore
104%{py_sitescriptdir}/stevedore-%{version}-py*.egg-info
105%endif
106
107%if %{with python3}
108%files -n python3-stevedore
109%defattr(644,root,root,755)
110%doc README.rst LICENSE
111%{py3_sitescriptdir}/stevedore
112%{py3_sitescriptdir}/stevedore-%{version}-py*.egg-info
113%endif
This page took 0.122201 seconds and 4 git commands to generate.