%global _python_dist_allow_version_zero 1
%global srcname cpi
%global vdk_pylib_req vdk-pylib >= 0.2.0, vdk-pylib < 0.3.0


Name:           python-cpi
Version:        0.0.7
Release:        1%{?dist}
Summary:        cpi - Collection Pipeline Interface for Python
URL:            https://gitlab.com/vornet/python/python-cpi
License:        LGPLv2
Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  %{vdk_pylib_req}

%description
Collection Pipeline Interface for Python

Built with vdk-pylib-0.2.3


%package -n python3-%{srcname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3
Requires:       python3
%description -n python3-%{srcname}
Collection Pipeline Interface for Python


%prep
%setup -q


%build
make %{?_smp_mflags} PREFIX=/usr pystuff
%py3_build

%install
%py3_install

%check
export VDK_TEST__DEBUG=true
export VDK_TEST__PYLIB_MODNAME=%{srcname}
%{_vdk_utildir}/vdk_test mypy \
  && %{_vdk_utildir}/vdk_test doctest \
  && %{_vdk_utildir}/vdk_test unittest \
  && %{_vdk_utildir}/vdk_test pytest

%files -n python3-%{srcname}
%{python3_sitelib}/%{srcname}-*.egg-info
%{python3_sitelib}/%{srcname}/


%changelog

# vim: syntax=spec:
# specfile built with MKit 0.1.3 and vdk-pylib-0.2.3