9c2071b
%global pypi_name admesh
9c2071b
9c2071b
Name:           python-%{pypi_name}
3f8b346
Version:        0.98.9
8f50592
Release:        %autorelease
9c2071b
Summary:        Python bindings for ADMesh, STL manipulation library
9c2071b
9c2071b
License:        GPLv2+
9c2071b
URL:            https://github.com/admesh/python-admesh
1aa6227
Source0:        https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
9c99243
9c99243
# https://github.com/admesh/python-admesh/issues/15
9c99243
Source1:        %{url}/raw/v%{version}/test/utils.py
9c99243
8516ee3
BuildRequires:  gcc
8516ee3
9c2071b
BuildRequires:  admesh-devel >= 0.98
1aa6227
9c2071b
BuildRequires:  python3-devel
8947dcb
BuildRequires:  python3-pytest
9c2071b
BuildRequires:  python3-setuptools
9c2071b
BuildRequires:  python3-Cython
1aa6227
BuildRequires:  python3-pytest-runner
9c2071b
9c2071b
%description
9c2071b
This module provides bindings for the ADMesh library.
9c2071b
It lets you manipulate 3D models in binary or ASCII STL
9c2071b
format and partially repair them if necessary.
9c2071b
1aa6227
%package -n     python3-%{pypi_name}
1aa6227
Summary:        Python 3 bindings for ADMesh, STL manipulation library
1aa6227
%{?python_provide:%python_provide python3-%{pypi_name}}
1aa6227
a663d49
Obsoletes:      python2-%{pypi_name} < 0.98.8-2
a663d49
Obsoletes:      python-%{pypi_name} < 0.98.8-2
a663d49
9c2071b
%description -n python3-%{pypi_name}
9c2071b
This module provides bindings for the ADMesh library.
9c2071b
It lets you manipulate 3D models in binary or ASCII STL
9c2071b
format and partially repair them if necessary.
9c2071b
9c2071b
9c2071b
%prep
9c2071b
%setup -q -n %{pypi_name}-%{version}
9c99243
cp %{SOURCE1} test/
9c2071b
9c2071b
%build
1aa6227
%py3_build
9c2071b
9c2071b
9c2071b
%install
1aa6227
%py3_install
9c2071b
9c2071b
%check
3f8b346
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-3 -v \
3f8b346
%ifarch ppc64
3f8b346
  -k "not test_saved_equals_original_binary" # likely a bug in admesh itself
3f8b346
%endif
1aa6227
9c2071b
%files -n python3-%{pypi_name}
1aa6227
%doc README.rst
1aa6227
%license COPYING
e263630
%attr(0755,root,root) %{python3_sitearch}/%{pypi_name}.*.so
be32eb4
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
9c2071b
9c2071b
9c2071b
%changelog
8f50592
%autochangelog