Blob Blame History Raw
Name:           python-i3ipc
Version:        1.5.1
Release:        1%{?dist}
Summary:        An improved Python library to control i3wm
License:        BSD
URL:            https://github.com/acrisci/i3ipc-python
BuildArch:      noarch

Source0:        https://github.com/acrisci/i3ipc-python/archive/v%{version}.tar.gz

# https://github.com/acrisci/i3ipc-python/pull/76
Patch0:         0001-Adapt-test-launcher-for-our-envirnoment.patch

BuildRequires:  python2-devel
BuildRequires:  python3-devel
# Test deps
BuildRequires:  i3
BuildRequires:  python2-pytest
BuildRequires:  python3-pytest
BuildRequires:  xorg-x11-server-Xvfb
BuildRequires:  python2-enum34

%global desc \
i3's interprocess communication (or ipc) is the interface i3wm uses to receive\
commands from client applications such as i3-msg. It also features\
a publish/subscribe mechanism for notifying interested parties of window\
manager events.\
\
i3ipc-python is a Python library for controlling the window manager. This\
project is intended to be useful for general scripting, and for applications\
that interact with the window manager like status line generators, notification\
daemons, and pagers.\

%description
%{desc}

%package -n python2-i3ipc
Summary:        %{summary}
Requires:       python2-enum34
%{?python_provide:%python_provide python2-i3ipc}

%description -n python2-i3ipc
%{desc}

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

%description -n python3-i3ipc
%{desc}

%prep
%setup -q -n i3ipc-python-%{version}

%patch0 -p1

sed -i '/^#!/d' i3ipc/i3ipc.py

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
# testing on python3 only, as the test runner is broken on python2
python3 run-tests.py

%files -n python2-i3ipc
%{python2_sitelib}/*
%license LICENSE
%doc README.rst

%files -n python3-i3ipc
%{python3_sitelib}/*
%license LICENSE
%doc README.rst

%changelog
* Tue Aug 07 2018 Michael Simacek <msimacek@redhat.com> - 1.5.1-1
- Update to upstream version 1.5.1

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 1.4.0-2
- Rebuilt for Python 3.7

* Mon Feb 12 2018 Michael Simacek <msimacek@redhat.com> - 1.4.0-1
- Update to upstream version 1.4.0
- Enable tests

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Dec 06 2017 Michael Simacek <msimacek@redhat.com> - 1.3.0-2
- Fix Requires on python2-enum34

* Wed Aug 16 2017 Michael Simacek <msimacek@redhat.com> - 1.3.0-1
- Update to upstream version 1.3.0
- Enable python3 support

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

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

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Sun Jun 19 2016 Michael Simacek <msimacek@redhat.com> - 1.2.0-1
- Initial packaging