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
8 Summary: Cross-platform system power status information
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/p/power/power-%{version}.tar.gz
15 # Source0-md5: 7346e84338da5478c598c5639a484070
16 URL: https://github.com/Kentzo/Power
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.710
20 BuildRequires: python-devel
21 BuildRequires: python-setuptools
24 BuildRequires: python3-devel
25 BuildRequires: python3-modules
26 BuildRequires: python3-setuptools
28 Requires: python-modules
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Python module that allows you to get power and battery status of the
36 %package -n python3-%{module}
37 Summary: Cross-platform system power status information
38 Group: Libraries/Python
39 Requires: python3-modules
41 %description -n python3-%{module}
42 Python module that allows you to get power and battery status of the
46 %setup -q -n %{module}-%{version}
50 %py_build %{?with_tests:test}
54 %py3_build %{?with_tests:test}
60 rm -rf _build/html/_sources
64 rm -rf $RPM_BUILD_ROOT
77 rm -rf $RPM_BUILD_ROOT
81 %defattr(644,root,root,755)
82 %{py_sitescriptdir}/%{module}
83 %if "%{py_ver}" > "2.4"
84 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
89 %files -n python3-%{module}
90 %defattr(644,root,root,755)
91 %{py3_sitescriptdir}/%{module}
92 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info