Blob Blame History Raw
%global srcname batinfo

Name:           python-%{srcname}
Version:        0.4.2
Release:        5%{?dist}
Summary:        Python module to retrieve battery information

License:        LGPLv3+
URL:            https://github.com/nicolargo/batinfo
Source0:        https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
Buildarch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
A simple Python module to retrieve battery information on Linux-based
operating system. No ACPI or external software is needed. Only the Linux
kernel and its /sys/class/power_supply folder.

%package -n python2-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
A simple Python module to retrieve battery information on Linux-based
operating system. No ACPI or external software is needed. Only the Linux
kernel and its /sys/class/power_supply folder.

%package -n python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
A simple Python module to retrieve battery information on Linux-based
operating system. No ACPI or external software is needed. Only the Linux
kernel and its /sys/class/power_supply folder.

%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install
rm -rf %{buildroot}%{_defaultdocdir}/%{srcname}/

%files -n python2-%{srcname}
%doc AUTHORS README.md
%license LICENSE
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}*.egg-info

%files -n python3-%{srcname}
%doc AUTHORS README.md
%license LICENSE
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}*.egg-info

%changelog
* Thu Jun 29 2017 Fabian Affolter <mail@fabian-affolter.ch> - 0.4.2-5
- Enable Python3 support by default

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.4.2-3
- Rebuild for Python 3.6

* Mon Nov 21 2016 Fabian Affolter <mail@fabian-affolter.ch> - 0.4.2-2
- Update description

* Fri Nov 18 2016 Fabian Affolter <mail@fabian-affolter.ch> - 0.4.2-1
- Add license and remove shebang removal
- Update to latest upstream release 0.4.2

* Tue Nov 15 2016 Fabian Affolter <mail@fabian-affolter.ch> - 0.3-1
- Initial package