Blob Blame History Raw
# Created by pyp2rpm-3.2.1
%global srcname ndjson-testrunner
%global srcname_ ndjson_testrunner

Name:           python-%{srcname}
Version:        1.0.0
Release:        1%{?dist}
Summary:        A test runner that outputs newline delimited JSON results

License:        GPLv3+
URL:            https://github.com/flying-sheep/ndjson-testrunner
Source0:        https://files.pythonhosted.org/packages/source/n/%{srcname}/%{srcname}-%{version}.tar.gz
# https://github.com/flying-sheep/ndjson-testrunner/pull/1
Source1:        COPYING
Source2:        tests.py

BuildArch:      noarch

%global _description \
A unittest TestRunner that outputs ndjson, one JSON record per test result. To \
be used for test result storage or interprocess communication.

%description %{_description}


%package -n python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description -n python3-%{srcname} %{_description}


%prep
%autosetup -n %{srcname}-%{version}
cp -p %SOURCE1 %SOURCE2 .

# Remove bundled egg-info
rm -rf %{srcname}.egg-info

%build
%py3_build

%install
%py3_install


%check
PYTHONPATH="%{buildroot}%{python3_sitelib}" \
    %{__python3} setup.py test


%files -n python3-%{srcname}
%doc README.rst
%license COPYING
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{srcname_}.py
%{python3_sitelib}/%{srcname_}-%{version}-py?.?.egg-info

%changelog
* Mon Oct 30 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.0-1
- Initial package.