## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname pycountry Name: python-%{srcname} Version: 24.6.1 Release: %autorelease Summary: ISO country, subdivision, language, currency and script definitions and their translations License: LGPL-2.1-only URL: https://github.com/pycountry/pycountry Source: %{pypi_source %{srcname}} # Rebased from Debian by Elliott Sales de Andrade. Patch: 0001-Use-system-iso-codes.patch # With iso-codes 4.10+, the number of subdivisions and currencies changed # the tests have asserts for exact values. Debian removed the asserts. # Instead, we change the asserts to be approximates. # If this proves to be too problematic in the future, we can go the Debian way. # # Rebased on 23.12.7 by Benjamin A. Beasley. While the same assertions are # made approximate as before, as of this writing only # test_subdivisions_directly_accessible would actually fail without this patch. # # Rebased on 24.6.1 by Elliott Sales de Andrade; no tests fail now that # upstream uses the same version of iso-codes as us, but this may change as # Fedora updates. Patch: 0002-Replace-exact-value-asserts-of-the-lengths-of-some-d.patch # We don't need this pytest plugin. Patch: 0003-Remove-pytest-cov-from-test-requirements.patch BuildArch: noarch BuildRequires: iso-codes >= 4.16 BuildRequires: python3-devel # See [tool.poetry.dev-dependencies] in pyproject.toml. BuildRequires: python3dist(pytest) BuildRequires: python3dist(importlib-metadata) %global _description %{expand: pycountry provides the ISO databases for the standards: * 639-3 Languages * 3166 Countries * 3166-3 Deleted countries * 3166-2 Subdivisions of countries * 4217 Currencies * 15924 Scripts} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} Requires: iso-codes >= 4.16 %description -n python3-%{srcname} %{_description} %prep %autosetup -n %{srcname}-%{version} -p1 # Remove bundled iso-codes data rm -rf src/%{srcname}/{databases,locales} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check %{pytest} --pyargs pycountry %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %license LICENSE.txt %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 24.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Jun 30 2024 Elliott Sales de Andrade - 24.6.1-1 - Update to latest version (#2284179) * Sat Jun 08 2024 Python Maint - 23.12.7-2 - Rebuilt for Python 3.13 * Tue Feb 06 2024 Benjamin A. Beasley - 23.12.7-1 - Update to 23.12.7 - Fix RHBZ#2261591, fix RHBZ#2259529 * Fri Jan 26 2024 Fedora Release Engineering - 22.3.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 22.3.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 22.3.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 22.3.5-7 - Rebuilt for Python 3.12 * Sun Apr 09 2023 Elliott Sales de Andrade - 22.3.5-6 - Switch to SPDX license * Fri Jan 20 2023 Fedora Release Engineering - 22.3.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 22.3.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jul 04 2022 Miro Hrončok - 22.3.5-3 - Fix build with iso-codes 4.10+ * Mon Jun 13 2022 Python Maint - 22.3.5-2 - Rebuilt for Python 3.11 * Sun Mar 06 2022 Elliott Sales de Andrade - 22.3.5-1 - Update to latest version (#2061063) * Fri Jan 21 2022 Fedora Release Engineering - 22.1.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 11 2022 Elliott Sales de Andrade - 22.1.10-1 - Update to latest version (#2038820) * Tue Jan 11 2022 Elliott Sales de Andrade - 20.7.3-9 - Switch to latest Python macros * Tue Jan 04 2022 Elliott Sales de Andrade - 20.7.3-6 - Cross port fixes for iso-codes 4.8 from Debian * Fri Jul 23 2021 Fedora Release Engineering - 20.7.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 20.7.3-4 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 20.7.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 20.7.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sat Jul 04 2020 Elliott Sales de Andrade - 20.7.3-1 - Update to latest version * Wed May 27 2020 Elliott Sales de Andrade - 19.8.18-5 - Support iso-codes 4.5 * Tue May 26 2020 Miro Hrončok - 19.8.18-5 - Rebuilt for Python 3.9 * Sun Feb 09 2020 Elliott Sales de Andrade - 19.8.18-4 - Update upstream URL - Backport patch to build with iso-codes 4.4 * Thu Jan 30 2020 Fedora Release Engineering - 19.8.18-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 19.8.18-2 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Elliott Sales de Andrade - 19.8.18-1 - Update to latest version * Fri Jul 26 2019 Fedora Release Engineering - 18.12.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 18.12.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Dec 13 2018 Elliott Sales de Andrade - 18.12.8-1 - Initial package. ## END: Generated by rpmautospec