1- Vendor: Microsoft Corporation
2- Distribution: Azure Linux
31# set upstream name variable
42%global srcname pycares
53
6-
7- Name: python-pycares
8- Version: 3.1.1
9- Release: 3%{?dist }
4+ Name: python3-pycares
5+ Version: 4.5.0
6+ Release: 1%{?dist }
107Summary: Python interface for c-ares
118
129License: MIT
10+ Vendor: Microsoft Corporation
11+ Distribution: Azure Linux
1312URL: https://github.com/saghul/pycares
14- Source0: https://github.com/saghul/%{ srcname } /archive/%{ srcname }- %{version }.tar.gz#/python-%{srcname}-%{version}.tar.gz
13+ Source0: https://github.com/saghul/pycares /archive/refs/tags/v %{version }.tar.gz#/python-%{srcname}-%{version}.tar.gz
1514
15+ BuildRequires: make
1616BuildRequires: gcc
1717BuildRequires: python3-cffi
18+ BuildRequires: python3-devel
19+ BuildRequires: python3-setuptools
20+ BuildRequires: c-ares-devel
21+ BuildRequires: iana-etc
1822# for docs
1923BuildRequires: python3-sphinx
20- BuildRequires: python3-devel
2124BuildRequires: python3-sphinx_rtd_theme
25+ BuildRequires: python3-sphinxcontrib-jquery
26+ # for tests
27+ BuildRequires: python3-pytest
2228
2329%description
2430pycares is a Python module which provides an interface to
2531c-ares. c-ares is a C library that performs DNS requests and name
2632resolutions asynchronously.
2733
28-
29-
30- %package -n python3-%{srcname }
31- Summary: Python interface for c-ares
32- %{?python_provide:%python_provide python3-%{srcname }}
33-
34- %description -n python3-%{srcname }
35- pycares is a Python module which provides an interface to
36- c-ares. c-ares is a C library that performs DNS requests and name
37- resolutions asynchronously.
38-
39-
40- %package -n python-%{srcname }-doc
34+ %package -n python3-%{srcname }-doc
4135Summary: Documentation for python-pycares
4236BuildArch: noarch
43- Requires: python3-%{srcname }
37+ Requires: python3-%{srcname } = %{ version }-%{ release }
4438
45- %description -n python -%{srcname }-doc
39+ %description -n python3 -%{srcname }-doc
4640pycares is a Python module which provides an interface to
4741c-ares. c-ares is a C library that performs DNS requests and name
4842resolutions asynchronously.
4943
5044This package contains documentation in reST and HTML formats.
5145
52-
53-
5446%prep
55- %autosetup -p1 -n %{srcname }-%{srcname }-%{version }
56-
47+ %autosetup -p1 -n %{srcname }-%{version }
5748
5849%build
50+ export PYCARES_USE_SYSTEM_LIB=1
5951%py3_build
6052
6153# Build sphinx documentation
6254pushd docs/
6355make html
6456popd # docs
6557
66-
6758%install
6859%py3_install
6960
@@ -77,30 +68,27 @@ mv -f %{buildroot}%{_pkgdocdir}/html/_sources/ %{buildroot}%{_pkgdocdir}/rst/
7768# Remove buildinfo sphinx documentation
7869rm -rf %{buildroot }%{_pkgdocdir }/html/.buildinfo
7970
80- # Fix non-standard modes (775)
81- chmod 755 %{buildroot }%{python3_sitearch }/%{srcname }/_cares.cpython-*.so
82-
83-
8471%check
85- %{__python3} setup.py test -s pycares._cares
86-
72+ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=%{ buildroot }%{ python3_sitelib } \
73+ %{ python3 } -m unittest -v
8774
88-
89- %files -n python3-%{srcname }
75+ %files
9076%license LICENSE
9177%doc README.rst ChangeLog
9278# For arch-specific packages: sitearch
9379%{python3_sitearch }/%{srcname }/
94- %{python3_sitearch }/%{srcname }-%{version }-* .egg-info/
95-
80+ %{python3_sitearch }/%{srcname }-%{version }-py%{python3_version }.egg-info/
9681
97- %files -n python -%{srcname }-doc
82+ %files -n python3 -%{srcname }-doc
9883%doc examples/
9984%{_pkgdocdir }/
10085
101-
102-
10386%changelog
87+ *
Wed Aug 13 2025 Akhila Guruju <[email protected] > -
4.5.0-1 88+ - Upgrade to 4.5.0 by taking reference from Fedora 41 spec (license: MIT).
89+ - License verified.
90+ - Added BR on python3-sphinxcontrib-jquery to fix build.
91+
10492*
Fri Oct 15 2021 Pawel Winogrodzki <[email protected] > -
3.1.1-3 10593- Initial CBL-Mariner import from Fedora 32 (license: MIT).
10694
0 commit comments