%global commit 8ba6fca52e63bc4a299efcc9339c620b25402c09 %global shortcommit %(c=%{commit}; echo ${c:0:12}) %global srcname notify2 Name: python-%{srcname} Version: 0.3.1 Release: 1%{?dist} Summary: Python interface to DBus notifications Group: System Environment/Libraries License: BSD URL: https://bitbucket.org/takluyver/pynotify2 Source0: https://bitbucket.org/takluyver/pynotify2/get/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildArch: noarch %description This is a pure-python replacement for notify-python, using python-dbus to communicate with the notifications server directly. It's compatible with Python 2 and 3, and its callbacks can work with Gtk 3 or Qt 4 applications. %package doc Summary: HTML documentation for %name BuildRequires: python%{python3_pkgversion}-sphinx %description doc HTML documentation for the '%{srcname}' python module. %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %if 0%{?fedora} Recommends: %{name}-doc = %{version}-%{release} %endif # fedora %description -n python%{python3_pkgversion}-%{srcname} This is a pure-python replacement for notify-python, using python-dbus to communicate with the notifications server directly. It's compatible with Python 2 and 3, and its callbacks can work with Gtk 3 or Qt 4 applications. %prep %autosetup -p1 -n takluyver-pynotify2-%{shortcommit} %build %py3_build PYTHONPATH=$PWD %make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version} rm docs/_build/html/.buildinfo %install %py3_install install -m0644 -D docs/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1 %files doc %license LICENSE %doc docs/_build/html %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %{_mandir}/man1/%{srcname}.1.gz %{python3_sitelib}/%{srcname}.py %{python3_sitelib}/__pycache__/%{srcname}.*.py[co] %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info %changelog * Sat Oct 27 2018 Scott K Logan - 0.3.1-1 - Initial package