From eefd1e9b888c593cb5f7e0a04b03f1d144a3caf9f5670e242711982f073888a9 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 7 Dec 2020 02:13:16 +0000 Subject: [PATCH] Accepting request 853452 from home:bnavigator:branches:devel:languages:python - Add dataclasses requirement for Python 3.6: Fixes Leap 15.2 build and future TW python36 flavor gh#openSUSE/python-rpm-macros#66 OBS-URL: https://build.opensuse.org/request/show/853452 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=14 --- python-pydantic.changes | 6 ++++++ python-pydantic.spec | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/python-pydantic.changes b/python-pydantic.changes index 98394a3..9dff0f1 100644 --- a/python-pydantic.changes +++ b/python-pydantic.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 7 01:00:22 UTC 2020 - Benjamin Greiner + +- Add dataclasses requirement for Python 3.6: Fixes Leap 15.2 build + and future TW python36 flavor gh#openSUSE/python-rpm-macros#66 + ------------------------------------------------------------------- Mon Oct 12 08:58:44 UTC 2020 - Marketa Calabkova diff --git a/python-pydantic.spec b/python-pydantic.spec index 4be70c8..e037d6d 100644 --- a/python-pydantic.spec +++ b/python-pydantic.spec @@ -30,13 +30,17 @@ Source: https://github.com/samuelcolvin/pydantic/archive/v%{version}.tar # PATCH-FIX-UPSTREAM https://github.com/samuelcolvin/pydantic/commit/9c4860ce964a4eb2e22eedc21f21d406c596a82f Valdiate arguments config (#1663) Patch0: validate-config.patch BuildRequires: %{python_module email_validator >= 1.0.3} -BuildRequires: %{python_module mypy} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dotenv >= 0.10.4} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing_extensions >= 3.7.2} +BuildRequires: (python36-dataclasses if python36-base) +BuildRequires: (python3-dataclasses if python3-base < 3.7) BuildRequires: fdupes BuildRequires: python-rpm-macros +%if 0%{?python_version_nodots} == 36 +Requires: python-dataclasses +%endif Recommends: python-typing_extensions >= 3.7.2 Suggests: python-email_validator >= 1.0.3 Suggests: python-python-dotenv >= 0.10.4 @@ -49,7 +53,6 @@ Data validation and settings management using Python type hinting. %prep %setup -q -n pydantic-%{version} %patch0 -p1 -sed -i /dataclasses/d setup.py %build %python_build @@ -64,6 +67,7 @@ sed -i /dataclasses/d setup.py %files %{python_files} %license LICENSE %doc README.md HISTORY.md -%{python_sitelib}/* +%{python_sitelib}/pydantic +%{python_sitelib}/pydantic-%{version}*-info %changelog