Blob Blame History Raw
Name:           python-uvloop
Version:        0.19.0
Release:        7%{?dist}
Summary:        Ultra fast implementation of asyncio event loop on top of libuv

License:        MIT OR Apache-2.0
URL:            https://github.com/MagicStack/uvloop
Source:         %{url}/archive/v%{version}/uvloop-%{version}.tar.gz

# Fix compatibility with Cython 3.
Patch:          https://github.com/MagicStack/uvloop/pull/587.patch

# Fix build with Python 3.13: _Py_RestoreSignals() has been moved to internals
Patch:          https://github.com/MagicStack/uvloop/pull/604.patch

BuildRequires:  gcc
BuildRequires:  libuv-devel

BuildRequires:  python3-devel

# We avoid generating this via the “dev” dependency, because that would bring
# in unwanted documentation dependencies too.
BuildRequires:  %{py3_dist pytest}

%global _description \
uvloop is a fast, drop-in replacement of the built-in asyncio event loop.\
uvloop is implemented in Cython and uses libuv under the hood.

%description %{_description}

%package -n python3-uvloop
Summary:        %{summary}

%description -n python3-uvloop %{_description}

%prep
%autosetup -p1 -n uvloop-%{version}

# There currently doesn’t appear to be a way to pass through these “build_ext
# options,” so we resort to patching the defaults. Some related discussion
# appears in https://github.com/pypa/setuptools/issues/3896.
#
# always use cython to generate code (and generate a build dependency on it)
sed -i -e "/self.cython_always/s/False/True/" setup.py
# use system libuv
sed -i -e "/self.use_system_libuv/s/False/True/" setup.py

# To be sure, no 3rd-party stuff
rm -vrf vendor/

# - https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
# - Loosen SemVer pins; we must work with what we have available, especially
#   for test dependencies!
sed -r -i \
    -e "s/^([[:blank:]]*)([\"'](flake8|pycodestyle|mypy)\b)/\\1# \\2/" \
    -e 's/~=/>=/' \
    pyproject.toml

# We don’t have aiohttp==3.9.0b0; see if we can make do with the packaged
# version.
sed -r -i 's/aiohttp==3.9.0b0;/aiohttp>=3.9.0b0;/' pyproject.toml

# Require Cython 3.x
sed -i 's/\(Cython\)(>=0.29.36,<0.30.0)/\1>=3/' pyproject.toml

%generate_buildrequires
%pyproject_buildrequires -x test

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files uvloop

# Don’t ship C sources and headers.
find '%{buildroot}%{python3_sitearch}' -type f -name '*.[ch]' -print -delete
sed -r -i '/\.[ch]$/d' %{pyproject_files}

%check
%ifarch ppc64le
# ignore tests that fail on ppc64le
ignore="${ignore-} --ignore=tests/test_pipes.py"
%endif

# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
ignore="${ignore-} --ignore=tests/test_sourcecode.py"

# Don’t import the “un-built” uvloop from the build directory.
mkdir -p _empty
cd _empty
ln -s ../tests/ .

# test_getaddrinfo_8 and _9 run getaddrinfo with zero-length inputs
# libuv 1.48.0+ rejects that
# reported as https://github.com/MagicStack/uvloop/issues/596
# test_create_unix_server_1 fails with Python 3.13
# https://github.com/MagicStack/uvloop/pull/604
%pytest -v ${ignore-} -k "not test_getaddrinfo_8 and not test_getaddrinfo_9 and not test_create_unix_server_1 and not test_create_server_4"

%files -n python3-uvloop -f %{pyproject_files}
#license LICENSE-APACHE LICENSE-MIT
%doc README.rst

%changelog
* Tue Feb 04 2025 Joel Capitao <jcapitao@redhat.com> - 0.19.0-7
- Disable flaky test

* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.19.0-4
- Rebuilt for Python 3.13

* Tue Apr 30 2024 Karolina Surma <ksurma@redhat.com> - 0.19.0-3
- Fix build with Python 3.13

* Tue Feb 27 2024 Miro Hrončok <miro@hroncok.cz> - 0.19.0-2
- Skip tests with zero-length idna inputs, failing on libuv 1.48.0+

* Thu Feb 01 2024 Jerry James <loganjerry@gmail.com> - 0.19.0-1
- Version 0.19.0 (rhbz#2245745)
- Replace cython3 patch with upstream PR (fixes rhbz#2259751)

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Tue Dec 19 2023 Miro Hrončok <miro@hroncok.cz> - 0.18.0-2
- Use Cython 3 for building
- Fixes: rhbz#2254040

* Mon Oct 16 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.18.0-1
- Update to 0.18.0 (close RHBZ#2244190)

* Mon Oct 16 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.17.0-11
- Don’t ship C sources and headers

* Mon Oct 16 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.17.0-10
- Update to pyproject-rpm-macros
- Stop trying to omit uvloop._testbase; it is harmless, and we really do
  need it to run the tests against the installed-to-buildroot package.

* Sun Oct 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.17.0-9
- Update License to SPDX

* Fri Sep 22 2023 Carl George <carlwgeorge@fedoraproject.org> - 0.17.0-7
- Fix building against Python 3.12
- Switch to building against python3-cython0.29 compat package
- Delete tests that fail on Python 3.12
- Resolves: rhbz#2226364 rhbz#2220551 rhbz#2203920

* Sun Jul 23 2023 Python Maint <python-maint@redhat.com> - 0.17.0-6
- Rebuilt for Python 3.12

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 0.17.0-4
- Rebuilt for Python 3.12

* Wed Feb 22 2023 Paul Wouters <paul.wouters@aiven.io> - 0.17.0-3
- skip tests for now on ppc64le

* Tue Feb 21 2023 Paul Wouters <paul.wouters@aiven.io> - 0.17.0-2
- new sources for 0.17.0

* Tue Feb 21 2023 Paul Wouters <paul.wouters@aiven.io> - 0.17.0-1
- Update to 0.17.0 and fix test_libuv_api.py

* Tue Feb 21 2023 Paul Wouters <paul.wouters@aiven.io> - 0.15.3-7
- Revert "Disable tests for now"

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.15.3-4
- Rebuilt for Python 3.11

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Thu Aug 26 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.15.3-2
- Switch to %%autorelease/%%autochangelog

* Tue Aug 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.15.3-1
- Update to 0.15.3

* Tue Aug 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.15.2-3
- Drop obsolete python_provide macro

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Wed Jun 09 2021 Carl George <carl@george.computer> - 0.15.2-1
- Latest upstream 0.15.2

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.14.0-5
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Thu Jan 07 2021 Miro Hrončok <miro@hroncok.cz> - 0.14.0-3
- Backport Python 3.10+ compatibility

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jun 22 2020 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.14.0-1
- python-uvloop 0.14.0

* Tue May 26 2020 Miro Hrončok <miro@hroncok.cz> - 0.12.2-9
- Rebuilt for Python 3.9

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Oct 03 2019 Miro Hrončok <miro@hroncok.cz> - 0.12.2-7
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <miro@hroncok.cz> - 0.12.2-6
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Mon Jun 10 2019 Miro Hrončok <miro@hroncok.cz> - 0.12.2-4
- Add patch for Python 3.8 support

* Thu May 02 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.12.2-3
- Disable tests for now

* Thu May 02 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.12.2-2
- BR: PyOpenSSL

* Thu May 02 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.12.2-1
- Update to 0.12.2

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Mon Oct 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.11.2-3
- include files which were excluded

* Wed Aug 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.11.2-2
- BR: python3-psutil

* Wed Aug 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.11.2-1
- Update to 0.11.2

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

* Sat Jul 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.11.0-1
- Update to 0.11.0

* Fri Jun 22 2018 Jerry James <loganjerry@gmail.com> - 0.10.1-3
- Try again to fix thread ID type on 32-bit systems.

* Fri Jun 22 2018 Jerry James <loganjerry@gmail.com> - 0.10.1-2
- Fix thread ID type on 32-bit systems.

* Fri Jun 22 2018 Jerry James <loganjerry@gmail.com> - 0.10.1-1
- Update to 0.10.1 for python 3.7 support (bz 1556279 and 1584458).

* Tue Jun 19 2018 Miro Hrončok <miro@hroncok.cz> - 0.8.1-3
- Rebuilt for Python 3.7

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

* Wed Sep 13 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.1-1
- Update to 0.8.1

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-3
- Rebuilt for
  https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

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

* Sat Feb 11 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-1
- Update to 0.8.0

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

* Sat Jan 07 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.7.2-1
- Update to 0.7.2

* Tue Jan 03 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.7.1-1
- initial import