## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 11; 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 %bcond tests 1 # Dependencies for some extras are not (yet?) in EPEL10 %bcond pendulum %{undefined el10} %bcond phonenumbers %{undefined el10} %bcond pycountry %{undefined el10} %bcond cron 1 %bcond pymongo 1 %global forgeurl https://github.com/pydantic/pydantic-extra-types Name: python-pydantic-extra-types Version: 2.11.2 %forgemeta Release: %autorelease Summary: Extra types for Pydantic License: MIT URL: %{forgeurl} Source: %{forgesource} # fix: Adjust tests for Pydantic 2.13 Patch: %{forgeurl}/commit/6f0217de5e26b99d09ffd9bb95da415779e6bef6.patch # Allow python-ulid version 4.x # https://github.com/pydantic/pydantic-extra-types/pull/412 # (without changes to uv.lock, which we don’t use) Patch: pydantic-extra-types-2.11.2-python-ulid-v4.patch # Downstream-only: patch out tests that would require pytz # # We *could* BuildRequire pytz, but it’s nice to reduce dependencies on it in # general since it can be replaced by the standard library’s zoneinfo module, # and futhermore these tests can have spurious failures when pytz and zoneinfo # are using different versions of the timezone database and there’s a # discrepancy in their respective lists of all timezone names. Patch: 0001-Downstream-only-patch-out-tests-that-would-require-p.patch BuildArch: noarch BuildRequires: tomcli %if %{with tests} BuildRequires: %{py3_dist dirty-equals} BuildRequires: %{py3_dist pytest} # We patched pytz out of the “all” extra, and we don’t want to test with it, # either. See 0001-Downstream-only-patch-out-tests-that-would-require-p.patch. %endif %if %{with cron} && %{with pendulum} && %{with phonenumbers} && %{with pycountry} && %{with pymongo} %global all_extra 1 %else %if %{with pymongo} # This doesn’t have its own extra – it is only brought in through the “all” # extra – but it is still required for import-checking # pydantic_extra_types.mongo_object_id and for the test # tests/test_mongo_object_id.py, so we depend on it manually. BuildRequires: %{py3_dist pymongo} %endif %endif %global _description %{expand: A place for pydantic types that probably shouldn't exist in the main pydantic library.} # this is here to fix vim's syntax highlighting %description %_description %package -n python3-pydantic-extra-types Summary: %{summary} %description -n python3-pydantic-extra-types %_description %prep %autosetup %{forgesetupargs} -p1 # Since they will not be used, and https://pypi.org/project/tzdata/ is not # packaged, because it "is intended to be a fallback for systems that do not # have system time zone data installed (or don’t have it installed in a # standard location)", we patch out the tzdata and pytz dependencies: tomcli set pyproject.toml lists delitem --type regex --no-first \ project.optional-dependencies.all '(tzdata|pytz)\b.*' %generate_buildrequires %{pyproject_buildrequires %{shrink: %{?all_extra:--extras all} %{?with_phonenumbers:--extras phonenumbers} %{?with_pycountry:--extras pycountry} --extras semver --extras semver --extras python_ulid %{?with_pendulum:--extras pendulum} %{?with_cron:--extras cron} }} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files --assert-license pydantic_extra_types %check %{pyproject_check_import %{shrink: %{?!with_cron:--exclude pydantic_extra_types.cron} %{?!with_pendulum:--exclude pydantic_extra_types.pendulum_dt} %{?!with_phonenumbers:--exclude pydantic_extra_types.phone_numbers} %{?!with_pycountry:--exclude pydantic_extra_types.country} %{?!with_pycountry:--exclude pydantic_extra_types.currency_code} %{?!with_pycountry:--exclude pydantic_extra_types.language_code} %{?!with_pycountry:--exclude pydantic_extra_types.script_code} %{?!with_pymongo:--exclude pydantic_extra_types.mongo_object_id} %{nil}}} %if %{with tests} %if %{without cron} ignore="${ignore-} --ignore=tests/test_cron.py" %endif %if %{without pendulum} ignore="${ignore-} --ignore=tests/test_pendulum_dt.py" %endif %if %{without phonenumbers} ignore="${ignore-} --ignore=tests/test_phone_numbers.py" ignore="${ignore-} --ignore=tests/test_phone_numbers_validator.py" %endif %if %{without pycountry} ignore="${ignore-} --ignore=tests/test_country_code.py" ignore="${ignore-} --ignore=tests/test_currency_code.py" ignore="${ignore-} --ignore=tests/test_language_codes.py" ignore="${ignore-} --ignore=tests/test_scripts.py" %endif %if %{without pymongo} ignore="${ignore-} --ignore=tests/test_mongo_object_id.py" %endif %if %{without cron} || %{without pendulum} || %{without phonenumbers} || %{without pycountry} || %{without pymongo} ignore="${ignore-} --ignore=tests/test_json_schema.py" %endif %pytest --pythonwarnings=default ${ignore-} -k "${k-}" --verbose %endif %files -n python3-pydantic-extra-types -f %{pyproject_files} %doc README.md %if 0%{?all_extra} %pyproject_extras_subpkg -n python3-pydantic-extra-types all %endif %if %{with phonenumbers} %pyproject_extras_subpkg -n python3-pydantic-extra-types phonenumbers %endif %if %{with pycountry} %pyproject_extras_subpkg -n python3-pydantic-extra-types pycountry %endif %pyproject_extras_subpkg -n python3-pydantic-extra-types jsonschema %pyproject_extras_subpkg -n python3-pydantic-extra-types semver %pyproject_extras_subpkg -n python3-pydantic-extra-types python_ulid %if %{with pendulum} %pyproject_extras_subpkg -n python3-pydantic-extra-types pendulum %endif %if %{with cron} %pyproject_extras_subpkg -n python3-pydantic-extra-types cron %endif # The uuid_utils extra is only meaningful for python<3.14. Ideally, it should # be patched out of anything that asks for it, rather than us shipping a # metapackage for what is merely a “compat” extra. %changelog ## START: Generated by rpmautospec * Mon Aug 17 2026 Benjamin A. Beasley - 2.11.2-11 - Add missing “jsonschema” extra metapackage * Mon Aug 17 2026 Benjamin A. Beasley - 2.11.2-6 - Patch out tests that would require pytz - Fixes FTBFS due to a discrepancy in pytz vs. zoneinfo zone names * Tue Jul 21 2026 Benjamin A. Beasley - 2.11.2-5 - Allow python-ulid v4 * Thu Jul 16 2026 Fedora Release Engineering - 2.11.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Thu Jun 04 2026 Python Maint - 2.11.2-3 - Rebuilt for Python 3.15 * Wed May 13 2026 Benjamin A. Beasley - 2.11.2-2 - Patch tests for Pydantic 3.13 * Sun Apr 05 2026 Benjamin A. Beasley - 2.11.2-1 - Update to 2.11.2 (close RHBZ#2455195) * Mon Mar 16 2026 Benjamin A. Beasley - 2.11.1-1 - Update to 2.11.1 (close RHBZ#2447838) * Sat Jan 17 2026 Fedora Release Engineering - 2.11.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Mon Jan 05 2026 Benjamin A. Beasley - 2.11.0-2 - No longer skip test_json_schema, fixed in 2.11.0 * Sat Dec 27 2025 Benjamin A. Beasley - 2.11.0-1 - Update to 2.11.0 (close RHBZ#2425586) * Thu Oct 09 2025 Benjamin A. Beasley - 2.10.6-2 - Enable “cron” and “all” extras * Wed Oct 08 2025 Benjamin A. Beasley - 2.10.6-1 - Update to 2.10.6 (close RHBZ#2402439) * Wed Oct 08 2025 Benjamin A. Beasley - 2.10.5-7 - Re-enable pymongo integration tests * Fri Sep 19 2025 Python Maint - 2.10.5-6 - Rebuilt for Python 3.14.0rc3 bytecode * Fri Aug 15 2025 Python Maint - 2.10.5-5 - Rebuilt for Python 3.14.0rc2 bytecode * Tue Jul 29 2025 Benjamin A. Beasley - 2.10.5-4 - Ignore an inconsequential test failure with Pydantic 3.12.0a1 * Fri Jul 25 2025 Fedora Release Engineering - 2.10.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Sat Jun 21 2025 Benjamin A. Beasley - 2.10.5-2 - Disable pymongo integration tests for now (fix RHBZ#2372056) * Thu May 29 2025 Benjamin A. Beasley - 2.10.5-1 - Update to 2.10.5 (close RHBZ#2369192) * Thu May 22 2025 Benjamin A. Beasley - 2.10.4-3 - Let hatchling handle the license file automatically * Thu May 22 2025 Benjamin A. Beasley - 2.10.4-2 - Add build conditionals for several extras - This allows branching to EPEL10 without some optional dependencies * Mon Apr 28 2025 Benjamin A. Beasley - 2.10.4-1 - Update to 2.10.4 (close RHBZ#2362451) * Sat Apr 19 2025 Benjamin A. Beasley - 2.10.3-3 - F41+: Drop conditionals for F40, which has nearly reached end-of-life * Tue Mar 11 2025 Benjamin A. Beasley - 2.10.3-1 - Update to 2.10.3. Fixes rhbz#2350978. * Sat Jan 18 2025 Fedora Release Engineering - 2.10.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Wed Jan 15 2025 Benjamin A. Beasley - 2.10.2-1 - Update to 2.10.2. Fixes rhbz#2338374. * Thu Dec 19 2024 Benjamin A. Beasley - 2.10.1-1 - Update to 2.10.1. Fixes rhbz#2330807. * Mon Oct 21 2024 Benjamin A. Beasley - 2.10.0-2 - Another patch for python-ulid 3.0.0 (fix RHBZ#2320153) * Wed Oct 16 2024 Benjamin A. Beasley - 2.10.0-1 - Update to 2.10.0 (close RHBZ#2319061) * Sun Oct 13 2024 Benjamin A. Beasley - 2.9.0-5 - Allow python-ulid 3.0 * Wed Sep 11 2024 Benjamin A. Beasley - 2.9.0-4 - Adjust test_json_schema() for Pydantic 2.9 * Fri Aug 16 2024 Benjamin A. Beasley - 2.9.0-3 - Add a direct BuildRequires on pytz for the tests * Fri Jul 19 2024 Fedora Release Engineering - 2.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jul 05 2024 Benjamin A. Beasley - 2.9.0-1 - Update to 2.9.0. Fixes rhbz#2295691. - Add missing extras metapackages * Sat Jun 29 2024 Python Maint - 2.8.2-2 - Rebuilt for Python 3.13 * Sun Jun 16 2024 Benjamin A. Beasley - 2.8.2-1 - Update to 2.8.2. Fixes rhbz#2292564. * Fri Jun 14 2024 Benjamin A. Beasley - 2.8.1-1 - Update to 2.8.1. Fixes rhbz#2292384. * Tue Jun 04 2024 Benjamin A. Beasley - 2.8.0-1 - Update to 2.8.0. Fixes rhbz#2290380. * Tue Apr 23 2024 Benjamin A. Beasley - 2.7.0-1 - Update to 2.7.0. Fixes rhbz#2276774. * Sat Mar 2 2024 Maxwell G - 2.6.0-1 - Update to 2.6.0. Fixes rhbz#2267402. * Tue Feb 13 2024 Maxwell G - 2.5.0-1 - Update to 2.5.0. Fixes rhbz#2261943. * Wed Jan 31 2024 Benjamin A. Beasley - 2.4.1-1 - Update to 2.4.1 * Fri Jan 26 2024 Fedora Release Engineering - 2.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Sep 12 2023 Maxwell G - 2.1.0-1 - Initial package. Closes rhbz#2249133. ## END: Generated by rpmautospec