Blob Blame History Raw
%global srcname kiwisolver

Name:           python-%{srcname}
Version:        1.3.1
Release:        %autorelease
Summary:        A fast implementation of the Cassowary constraint solver

License:        BSD
URL:            https://github.com/nucleic/kiwi
Source0:        https://github.com/nucleic/kiwi/archive/%{version}/%{srcname}-%{version}.tar.gz

%global _description \
Kiwi is an efficient C++ implementation of the Cassowary constraint solving \
algorithm. Kiwi is an implementation of the algorithm based on the seminal \
Cassowary paper. It is *not* a refactoring of the original C++ solver. Kiwi has \
been designed from the ground up to be lightweight and fast.

BuildRequires:  gcc-c++

%description %{_description}


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

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(cppy) >= 1.1
BuildRequires:  python3dist(pytest)

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


%prep
%autosetup -n kiwi-%{version}

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


%build
%py3_build


%install
%py3_install


%check
%{pytest} py/tests/


%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitearch}/%{srcname}.cpython-*.so
%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info


%changelog
%autochangelog