diff --git a/python-idna.spec b/python-idna.spec index d4343ed615300cba67dc318674151308f3ae2895..6e1cd1d2be360242557ce67159c866264a239f44 100644 --- a/python-idna.spec +++ b/python-idna.spec @@ -1,55 +1,56 @@ -%define anolis_release 1 -%global srcname idna +%define anolis_release 2 +%global pypi_name idna -Name: python-%{srcname} +Name: python-%{pypi_name} Version: 3.4 Release: %{anolis_release}%{dist} Summary: Internationalized Domain Names in Applications (IDNA) - -License: BSD and Python and Unicode +License: BSD-3-Clause and Python and Unicode URL: https://github.com/kjd/idna -Source0: https://pypi.io/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3dist(pytest) +BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}dist(pytest) pyproject-rpm-macros python%{python3_pkgversion}-pytest %description -A library to support the Internationalised Domain Names in Applications (IDNA) -protocol as specified in RFC 5891 . This -version of the protocol is often referred to as "IDNA2008" and can produce -different results from the earlier standard from 2003. +Support for the Internationalized Domain Names in Applications (IDNA) protocol +as specified in RFC 5891. This is the latest version of the protocol and is +sometimes referred to as “IDNA 2008”. + +This library also provides support for Unicode Technical Standard 46, Unicode +IDNA Compatibility Processing. -The library is also intended to act as a suitable drop-in replacement for the -"encodings.idna" module that comes with the Python standard library but -currently only supports the older 2003 specification. +This acts as a suitable replacement for the “encodings.idna” module that comes +with the Python standard library, but which only supports the older superseded +IDNA specification (RFC 3490). -%package -n python3-%{srcname} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: Internationalized Domain Names in Applications (IDNA) -%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} + +%description -n python%{python3_pkgversion}-%{pypi_name} +Support for the Internationalized Domain Names in Applications (IDNA) protocol +as specified in RFC 5891. This is the latest version of the protocol and is +sometimes referred to as “IDNA 2008”. -%description -n python3-%{srcname} -A library to support the Internationalised Domain Names in Applications (IDNA) -protocol as specified in RFC 5891 . This -version of the protocol is often referred to as "IDNA2008" and can produce -different results from the earlier standard from 2003. +This library also provides support for Unicode Technical Standard 46, Unicode +IDNA Compatibility Processing. -The library is also intended to act as a suitable drop-in replacement for the -"encodings.idna" module that comes with the Python standard library but -currently only supports the older 2003 specification. +This acts as a suitable replacement for the “encodings.idna” module that comes +with the Python standard library, but which only supports the older superseded +IDNA specification (RFC 3490). %package doc Summary: Documentation files for %{name} -Requires: python3-%{srcname} = %{version}-%{release} +Requires: python%{python3_pkgversion}-%{pypi_name} = %{version}-%{release} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. %prep -%autosetup -p1 -n %{srcname}-%{version} -# Remove bundled egg-info -rm -rf %{srcname}.egg-info +%autosetup -p1 -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info %generate_buildrequires %pyproject_buildrequires @@ -59,19 +60,21 @@ rm -rf %{srcname}.egg-info %install %pyproject_install -%pyproject_save_files %{srcname} +%pyproject_save_files %{pypi_name} %check %pytest - -%files -n python3-%{srcname} -f %pyproject_files +%files -n python%{python3_pkgversion}-%{pypi_name} -f %pyproject_files %license LICENSE.md %files doc %doc README.rst HISTORY.rst %changelog +* Sat Apr 08 2023 Shawn Wang - 3.4-2 +- Optimize the spec file + * Wed Sep 21 2022 mgb01105731 - 3.4-1 - update to 3.4