From 1fc055031f10b64e6a2d58cd87af98aa0458927c Mon Sep 17 00:00:00 2001 From: tuibuilder_pel7x64builder0 Date: Sun, 7 Feb 2021 01:12:22 +0100 Subject: [PATCH] python-dataclasses package added Signed-off-by: tuibuilder_pel7x64builder0 --- SPECS/python-dataclasses.spec | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 SPECS/python-dataclasses.spec diff --git a/SPECS/python-dataclasses.spec b/SPECS/python-dataclasses.spec new file mode 100644 index 0000000..d4e9711 --- /dev/null +++ b/SPECS/python-dataclasses.spec @@ -0,0 +1,56 @@ +%global pypi_name dataclasses + +Name: python-%{pypi_name} +Version: 0.8 +Release: 1%{?dist} +Summary: An implementation of PEP 557: Data Classes +License: ASL 2.0 +URL: https://github.com/ericvsmith/dataclasses +Source0: https://github.com/ericvsmith/dataclasses/archive/%{version}.tar.gz +BuildArch: noarch +BuildRequires: python3-devel >= 3.6 +BuildRequires: python3-devel < 3.7 +BuildRequires: python3-setuptools + + +%global common_description %{expand: +This package is an implementation of PEP 557, Data Classes. It is a backport +for Python 3.6, as dataclasses is included in Python 3.7 and later.} +%description +%common_description + + +%package -n python3-%{pypi_name} +Summary: %{summary} +Provides: python3-%{pypi_name} +%description -n python3-%{pypi_name} +%common_description + + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + + +%build +%{__python3} setup.py build + + +%install +%{__python3} setup.py install --optimize 2 --root %{buildroot} + + +%check +%{__python3} -m unittest discover test + + +%files -n python3-%{pypi_name} +%license LICENSE.txt +%doc README.rst +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}.py +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + + +%changelog