%global bename cbor2 %global pkgname anyconfig-%{bename}-backend %global desctxt \ This is a CBOR backend module for python-anyconfig with using cbor2.\ \ python-anyconfig is a python library to provide common APIs to load dump\ various configuration files like INI, JSON and YAML. %if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without python3 %else %bcond_with python3 %endif Name: python-%{pkgname} Version: 0.0.3 Release: 1%{?dist} Summary: Backend module for python-anyconfig to load and dump CBOR data License: MIT URL: https://github.com/ssato/python-anyconfig-cbor2-backend Source0: %{url}/archive/RELEASE_%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description %{desctxt} # Both python{2,3}-cbor2 are available from my copr repo, ssato/python-anyconfig. %package -n python2-%{pkgname} Summary: %{summary} Requires: python2-anyconfig Requires: python2-cbor2 %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} %{desctxt} %if %{with python3} %package -n python3-%{pkgname} Summary: %{sumtxt} Requires: python3-anyconfig Requires: python3-cbor2 %{?python_provide:%python_provide python3-%{pkgname}} %description -n python3-%{pkgname} %{desctxt} %endif %prep %autosetup -n %{pkgname}-%{version} %build %py2_build %if %{with python3} %py3_build %endif %install %py2_install %if %{with python3} %py3_install %endif %files -n python2-%{pkgname} %doc README.rst %if 0%{?rhel} == 7 %{python_sitelib}/* %else %{python2_sitelib}/* %endif %if %{with python3} %files -n python3-%{pkgname} %doc README.rst %{python3_sitelib}/* %endif %changelog * Mon Jul 2 2018 Satoru SATOH - 0.0.3-1 - fix: follow changes of the argument ioi in load APIs in anyconfig - fix: cleanup the RPM SPEC same as anyconfig - enhancement: [doc] update description and how to install * Sun Jan 14 2018 Satoru SATOH - 0.0.2-2 - fix: excluded tests/ from packages * Sun Jan 14 2018 Satoru SATOH - 0.0.2-1 - Just some package cleanups and doc updates * Thu Jan 11 2018 Satoru SATOH - 0.0.1-1 - Initial packaging forked from python-anyconfig-cbor-backend