Blame SPECS/python-anyio.spec

rdobuilder 1993a6
%global srcname anyio
rdobuilder 1993a6
rdobuilder 1993a6
%if %{defined fedora}
rdobuilder 1993a6
# As of 2022-03-04, neither EL9 or EPEL9 have python3-uvloop
rdobuilder 1993a6
%bcond_without tests
rdobuilder 1993a6
# As of 2022-03-04, neither EL9 or EPEL9 have python3-sphinx-autodoc-typehints
rdobuilder 1993a6
%bcond_without docs
rdobuilder 1993a6
%endif
rdobuilder 1993a6
rdobuilder 1993a6
%global common_description %{expand:
rdobuilder 1993a6
AnyIO is an asynchronous networking and concurrency library that works on top
rdobuilder 1993a6
of either asyncio or trio.  It implements trio-like structured concurrency (SC)
rdobuilder 1993a6
on top of asyncio, and works in harmony with the native SC of trio itself.}
rdobuilder 1993a6
rdobuilder 1993a6
Name:           python-%{srcname}
rdobuilder 1993a6
Version:        3.5.0
rdobuilder 1993a6
Release:        1%{?dist}
rdobuilder 1993a6
Summary:        Compatibility layer for multiple asynchronous event loop implementations
rdobuilder 1993a6
License:        MIT
rdobuilder 1993a6
URL:            https://github.com/agronholm/anyio
rdobuilder 1993a6
Source:         %pypi_source
rdobuilder 1993a6
BuildArch:      noarch
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%description %{common_description}
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%package -n python3-%{srcname}
rdobuilder 1993a6
Summary:        %{summary}
rdobuilder 1993a6
BuildRequires:  python3-devel
rdobuilder 1993a6
BuildRequires:  pyproject-rpm-macros
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%description -n python3-%{srcname} %{common_description}
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%pyproject_extras_subpkg -n python3-%{srcname} trio
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%if %{with docs}
rdobuilder 1993a6
%package -n python-%{srcname}-doc
rdobuilder 1993a6
Summary:        anyio documentation
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%description -n python-%{srcname}-doc
rdobuilder 1993a6
Documentation for anyio
rdobuilder 1993a6
%endif
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%prep
rdobuilder 1993a6
%autosetup -n %{srcname}-%{version} -p1
rdobuilder 1993a6
rdobuilder 1993a6
# disable coverage test requirement
rdobuilder 1993a6
sed -e '/coverage/d' -i setup.cfg
rdobuilder 1993a6
rdobuilder 1993a6
# despite the prescense of a pytest "network" marker, socket tests still fail
rdobuilder 1993a6
# without internet access
rdobuilder 1993a6
rm tests/test_sockets.py
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%generate_buildrequires
rdobuilder 1993a6
%pyproject_buildrequires -x trio%{?with_tests:,test}%{?with_docs:,doc}
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%build
rdobuilder 1993a6
%pyproject_wheel
rdobuilder 1993a6
%if %{with docs}
rdobuilder 1993a6
# generate html docs
rdobuilder 1993a6
PYTHONPATH=${PWD} sphinx-build-3 docs html
rdobuilder 1993a6
# remove the sphinx-build leftovers
rdobuilder 1993a6
rm -rf html/.{doctrees,buildinfo}
rdobuilder 1993a6
%endif
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%install
rdobuilder 1993a6
%pyproject_install
rdobuilder 1993a6
%pyproject_save_files %{srcname}
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%if %{with tests}
rdobuilder 1993a6
%check
rdobuilder 1993a6
%pytest -m "not network"
rdobuilder 1993a6
%endif
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%files -n python3-%{srcname} -f %{pyproject_files}
rdobuilder 1993a6
%doc README.rst
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%if %{with docs}
rdobuilder 1993a6
%files -n python-%{srcname}-doc
rdobuilder 1993a6
%doc html
rdobuilder 1993a6
%license LICENSE
rdobuilder 1993a6
%endif
rdobuilder 1993a6
rdobuilder 1993a6
rdobuilder 1993a6
%changelog
rdobuilder 1993a6
* Fri Mar 04 2022 Carl George <carl@george.computer> - 3.5.0-1
rdobuilder 1993a6
- Latest upstream rhbz#2007952
rdobuilder 1993a6
- Enable test suite
rdobuilder 1993a6
- Only run test on Fedora
rdobuilder 1993a6
- Only build docs on Fedora
rdobuilder 1993a6
rdobuilder 1993a6
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-3
rdobuilder 1993a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
rdobuilder 1993a6
rdobuilder 1993a6
* Fri Oct 08 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 3.3.1-2
rdobuilder 1993a6
- Add metapackage for “trio” extra
rdobuilder 1993a6
rdobuilder 1993a6
* Wed Sep 08 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.3.1-1
rdobuilder 1993a6
- Update to latest upstream release 3.3.1 (closes rhbz#1975540)
rdobuilder 1993a6
rdobuilder 1993a6
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-2
rdobuilder 1993a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
rdobuilder 1993a6
rdobuilder 1993a6
* Tue Jun 22 2021 Carl George <carl@george.computer> - 3.2.0-1
rdobuilder 1993a6
- Latest upstream
rdobuilder 1993a6
- Fixes: rhbz#1926501
rdobuilder 1993a6
- Fixes: rhbz#1900506
rdobuilder 1993a6
rdobuilder 1993a6
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.2-2
rdobuilder 1993a6
- Rebuilt for Python 3.10
rdobuilder 1993a6
rdobuilder 1993a6
* Thu Jan 28 2021 Dan Čermák <dan.cermak@cgc-instruments.com> - 2.0.2-1
rdobuilder 1993a6
- New upstream release 2.0.2
rdobuilder 1993a6
rdobuilder 1993a6
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
rdobuilder 1993a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
rdobuilder 1993a6
rdobuilder 1993a6
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
rdobuilder 1993a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
rdobuilder 1993a6
rdobuilder 1993a6
* Tue Jun 02 2020 Carl George <carl@george.computer> - 1.3.1-1
rdobuilder 1993a6
- Latest upstream
rdobuilder 1993a6
rdobuilder 1993a6
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.3-3
rdobuilder 1993a6
- Rebuilt for Python 3.9
rdobuilder 1993a6
rdobuilder 1993a6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-2
rdobuilder 1993a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
rdobuilder 1993a6
rdobuilder 1993a6
* Mon Jan 13 2020 Carl George <carl@george.computer> - 1.2.3-1
rdobuilder 1993a6
- Latest upstream rhbz#1786957
rdobuilder 1993a6
rdobuilder 1993a6
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-4
rdobuilder 1993a6
- Rebuilt for Python 3.8.0rc1 (#1748018)
rdobuilder 1993a6
rdobuilder 1993a6
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-3
rdobuilder 1993a6
- Rebuilt for Python 3.8
rdobuilder 1993a6
rdobuilder 1993a6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
rdobuilder 1993a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
rdobuilder 1993a6
rdobuilder 1993a6
* Thu May 16 2019 Carl George <carl@george.computer> - 1.0.0-1
rdobuilder 1993a6
- Initial package