diff --git a/python-zeroconf.spec b/python-zeroconf.spec index 126e127dc7402b4f47d3c4b6014d1d471b15a8e6..4f9d6e65853b0ded62db9d296b96a735061f4e88 100644 --- a/python-zeroconf.spec +++ b/python-zeroconf.spec @@ -1,6 +1,7 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-zeroconf -Version: 0.136.2 +Version: 0.148.0 Release: 1 Summary: Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) License: LGPL-2.1-only @@ -11,12 +12,8 @@ BuildArch: noarch Requires: python3-async-timeout Requires: python3-ifaddr -%description -Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) - -%package -n python3-zeroconf -Summary: Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) -Provides: python-zeroconf = %{version}-%{release} +BuildRequires: python3-build +BuildRequires: python3-hatchling BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip @@ -25,6 +22,13 @@ BuildRequires: python3-ifaddr BuildRequires: python3-async-timeout BuildRequires: python3-pytest BuildRequires: python3-pytest-cov + +%description +Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) + +%package -n python3-zeroconf +Summary: Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) +Provides: python-zeroconf = %{version}-%{release} %description -n python3-zeroconf Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) @@ -37,11 +41,29 @@ Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) %prep %autosetup -n zeroconf-%{version} -p1 +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi + %build -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_build %install -%py3_install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi @@ -79,6 +101,9 @@ pytest -v -k 'not test_integration_with_listener_ipv6' %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 0.148.0-1 +- Update package to version 0.148.0 + * Fri Aug 22 2025 openeuler_bot - 0.136.2-1 - fix: retrigger release from failed github workflow (version:0.136.2). diff --git a/zeroconf-0.136.2.tar.gz b/zeroconf-0.136.2.tar.gz deleted file mode 100644 index 5cc485e8985464564b7b47994ac3986dbbe0bff3..0000000000000000000000000000000000000000 Binary files a/zeroconf-0.136.2.tar.gz and /dev/null differ diff --git a/zeroconf-0.148.0.tar.gz b/zeroconf-0.148.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..212aaf525f8a3c7dee826ce36ad0b4b8b8185318 Binary files /dev/null and b/zeroconf-0.148.0.tar.gz differ