Skip to content

Commit 69440b7

Browse files
Upgrade: python3-pycares version to 4.5.0 (microsoft#12508)
1 parent 4e6abba commit 69440b7

File tree

6 files changed

+39
-51
lines changed

6 files changed

+39
-51
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,6 @@
17841784
"python-productmd",
17851785
"python-prometheus_client",
17861786
"python-ptyprocess",
1787-
"python-pycares",
17881787
"python-pycosat",
17891788
"python-pydbus",
17901789
"python-pymongo",
@@ -1900,6 +1899,7 @@
19001899
"python-zstandard",
19011900
"python-zstd",
19021901
"python3-mallard-ducktype",
1902+
"python3-pycares",
19031903
"python3-pytest-asyncio",
19041904
"python3-typed_ast",
19051905
"pyusb",

SPECS-EXTENDED/python-pycares/python-pycares.signatures.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Signatures": {
3+
"python-pycares-4.5.0.tar.gz": "09b24ba644509e17e6caf8f66a9b183b367dfddd9096d0387da4d96641d4f70f"
4+
}
5+
}

SPECS-EXTENDED/python-pycares/python-pycares.spec renamed to SPECS-EXTENDED/python3-pycares/python3-pycares.spec

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,60 @@
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}
107
Summary: Python interface for c-ares
118

129
License: MIT
10+
Vendor: Microsoft Corporation
11+
Distribution: Azure Linux
1312
URL: 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
1616
BuildRequires: gcc
1717
BuildRequires: python3-cffi
18+
BuildRequires: python3-devel
19+
BuildRequires: python3-setuptools
20+
BuildRequires: c-ares-devel
21+
BuildRequires: iana-etc
1822
# for docs
1923
BuildRequires: python3-sphinx
20-
BuildRequires: python3-devel
2124
BuildRequires: python3-sphinx_rtd_theme
25+
BuildRequires: python3-sphinxcontrib-jquery
26+
# for tests
27+
BuildRequires: python3-pytest
2228

2329
%description
2430
pycares is a Python module which provides an interface to
2531
c-ares. c-ares is a C library that performs DNS requests and name
2632
resolutions 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
4135
Summary: Documentation for python-pycares
4236
BuildArch: noarch
43-
Requires: python3-%{srcname}
37+
Requires: python3-%{srcname} = %{version}-%{release}
4438

45-
%description -n python-%{srcname}-doc
39+
%description -n python3-%{srcname}-doc
4640
pycares is a Python module which provides an interface to
4741
c-ares. c-ares is a C library that performs DNS requests and name
4842
resolutions asynchronously.
4943

5044
This 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
6254
pushd docs/
6355
make html
6456
popd # 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
7869
rm -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

cgmanifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24112,9 +24112,9 @@
2411224112
"component": {
2411324113
"type": "other",
2411424114
"other": {
24115-
"name": "python-pycares",
24116-
"version": "3.1.1",
24117-
"downloadUrl": "https://github.com/saghul/pycares/archive/pycares-3.1.1.tar.gz"
24115+
"name": "python3-pycares",
24116+
"version": "4.5.0",
24117+
"downloadUrl": "https://github.com/saghul/pycares/archive/refs/tags/v4.5.0.tar.gz"
2411824118
}
2411924119
}
2412024120
},

0 commit comments

Comments
 (0)