Michal Ambroz 200b0c5
Name:           python-pyev
Michal Ambroz 200b0c5
Version:        0.9.0
Michal Ambroz 200b0c5
License:        GPLv3+
Michal Ambroz 200b0c5
Summary:        Python binding for the libev library
Michal Ambroz 200b0c5
URL:            https://github.com/gabrielfalcao/pyev
Michal Ambroz 200b0c5
#               https://code.google.com/archive/p/pyev/
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%global         gituser         gabrielfalcao
Michal Ambroz 200b0c5
%global         gitname         pyev
Michal Ambroz 200b0c5
%global         gitdate         20130610
Michal Ambroz 200b0c5
%global         commit          e31d13720916439038290d57d00ee3604298705f
Michal Ambroz 200b0c5
%global         shortcommit     %(c=%{commit}; echo ${c:0:7})
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} >= 7 )
Michal Ambroz 200b0c5
%global with_python3 1
Michal Ambroz 200b0c5
%endif
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?rhel} && 0%{?rhel} <= 6
Michal Ambroz 200b0c5
%{!?__python2:        %global __python2 /usr/bin/python2}
Michal Ambroz 200b0c5
%endif
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?fedora} <= 21
Michal Ambroz 200b0c5
 %{!?py3_build:         %global py3_build       %{__python3} setup.py build --executable="%{__python3} -s"}
Michal Ambroz 200b0c5
 %{!?py3_install:       %global py3_install     %{__python3} setup.py install -O1 --skip-build --root %{buildroot}}
Michal Ambroz 200b0c5
%endif
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
# Build source is github release=1 or git commit=0
Michal Ambroz 200b0c5
%global         build_release    0
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?build_release}  > 0
fe4270d
Release:        16%{?dist}
Michal Ambroz 200b0c5
Source0:        https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Michal Ambroz 200b0c5
%else
fe4270d
Release:        0.16.%{gitdate}git%{shortcommit}%{?dist}
Michal Ambroz 200b0c5
Source0:        https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
Michal Ambroz 200b0c5
%endif #build_release
Michal Ambroz 200b0c5
e71db24
# https://bugzilla.redhat.com/show_bug.cgi?id=1817984
e71db24
Patch1:         python3.9.patch
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
BuildRequires:  gcc
Michal Ambroz 200b0c5
BuildRequires:  libtool
Michal Ambroz 200b0c5
BuildRequires:  libev-devel
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?with_python3}
Michal Ambroz 200b0c5
BuildRequires:  python%{python3_pkgversion}-devel
Michal Ambroz 200b0c5
BuildRequires:  python%{python3_pkgversion}-setuptools
Michal Ambroz 200b0c5
%endif # if with_python3
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
# html doc generation
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%description
Michal Ambroz 200b0c5
Python binding for the libev library.
Michal Ambroz 200b0c5
The libev is an event loop: you register interest in certain events (such
Michal Ambroz 200b0c5
as a file descriptor being readable or a timeout occurring), and it will 
Michal Ambroz 200b0c5
manage these event sources and provide your program with events.
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?with_python3}
Michal Ambroz 200b0c5
%package -n python%{python3_pkgversion}-%{gitname}
Michal Ambroz 200b0c5
Summary:        Python3 binding for the libev library
Michal Ambroz 200b0c5
%{?python_provide:%python_provide python%{python3_pkgversion}-%{gitname}}
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%description -n python%{python3_pkgversion}-%{gitname}
Michal Ambroz 200b0c5
The libev for Python3 wrapper - This is a Python extension that gives access
Michal Ambroz 200b0c5
to libev library to be called from Python scripts.
Michal Ambroz 200b0c5
%endif # with_python3
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%prep
Michal Ambroz 200b0c5
%if 0%{?build_release} > 0
Michal Ambroz 200b0c5
# Build from git release version
e71db24
%autosetup -p1 -n %{gitname}-%{version}
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%else
Michal Ambroz 200b0c5
# Build from git commit
e71db24
%autosetup -p1 -n %{gitname}-%{commit}
Michal Ambroz 200b0c5
%endif
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%build
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?with_python3}
Michal Ambroz 200b0c5
%py3_build
Michal Ambroz 200b0c5
%endif # with_python3
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%install
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?with_python3}
Michal Ambroz 200b0c5
%py3_install
Michal Ambroz 200b0c5
%endif # with_python3
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
#check
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%if 0%{?with_python3}
Michal Ambroz 200b0c5
%files -n python%{python3_pkgversion}-%{gitname}
Michal Ambroz 200b0c5
#license LICENSE
Michal Ambroz 200b0c5
%doc README.md
Michal Ambroz 200b0c5
%{python3_sitearch}/%{gitname}*
Michal Ambroz 200b0c5
%endif # with_python3
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
Michal Ambroz 200b0c5
%changelog
fe4270d
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.16.20130610gite31d137
fe4270d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
fe4270d
3384a78
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.15.20130610gite31d137
3384a78
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
3384a78
5fa3038
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.9.0-0.14.20130610gite31d137
5fa3038
- Rebuilt for Python 3.10
5fa3038
779722b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.13.20130610gite31d137
779722b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
779722b
c062e18
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.12.20130610gite31d137
c062e18
- Second attempt - Rebuilt for
c062e18
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c062e18
131f5b6
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.11.20130610gite31d137
131f5b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
131f5b6
00d93cc
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-0.10.20130610gite31d137
00d93cc
- Rebuilt for Python 3.9
00d93cc
39e0acc
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.9.20130610gite31d137
39e0acc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
39e0acc
487b6a3
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-0.8.20130610gite31d137
487b6a3
- Rebuilt for Python 3.8
487b6a3
2e8599a
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.7.20130610gite31d137
2e8599a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2e8599a
447fef7
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.6.20130610gite31d137
447fef7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
447fef7
fcfb57c
* Mon Dec 10 2018 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-0.5.20130610gite31d137
fcfb57c
- Don't BR python2
fcfb57c
ea5d3e6
* Wed Oct 10 2018 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-0.4.20130610gite31d137
ea5d3e6
- Python2 binary package has been removed
ea5d3e6
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
ea5d3e6
2c8a7e0
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-0.3.20130610gite31d137
2c8a7e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2c8a7e0
7db2aa3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-0.2.20130610gite31d137
7db2aa3
- Rebuilt for Python 3.7
7db2aa3
Michal Ambroz 200b0c5
* Wed Mar 21 2018 Michal Ambroz <rebus at, seznam.cz> - 0.9.0-0.1
Michal Ambroz 200b0c5
- initial package for Fedora
Michal Ambroz 200b0c5