Blob Blame History Raw
%global pypi_name numpy-stl

Name:           python-%{pypi_name}
Version:        2.2.3
Release:        1%{?dist}
Summary:        Library for reading, writing and modifying STL files

License:        BSD
URL:            https://github.com/WoLpH/numpy-stl/
Source0:        https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildRequires:  python3-devel
BuildRequires:  python3-Cython
BuildRequires:  python3-nine
BuildRequires:  python3-numpy
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-runner
BuildRequires:  python3-setuptools
BuildRequires:  python3-sphinx
BuildRequires:  python3-utils >= 1.6.2

%description
Simple library to make working with STL files (and 3D objects in general) fast
and easy. Due to all operations heavily relying on numpy this is one of the
fastest STL editing libraries for Python available.

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

Requires:       python3-numpy
Requires:       python3-nine
Requires:       python3-utils >= 1.6.2
Requires:       python3-setuptools

%description -n python3-%{pypi_name}
Simple library to make working with STL files (and 3D objects in general) fast
and easy. Due to all operations heavily relying on NumPy this is one of the
fastest STL editing libraries for Python available.

%package        doc
Summary:        %{name} documentation
Suggests:       python3-%{pypi_name}
%description doc
Documentation for %{name}.

%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build
# generate html docs
sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
%py3_install


%check
# The tests on armv7hl fail with Bus errors, will investigate later
%ifnarch armv7hl
%{__python3} setup.py pytest
%endif


%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{_bindir}/stl
%{_bindir}/stl2bin
%{_bindir}/stl2ascii
%{python3_sitearch}/stl
%{python3_sitearch}/numpy_stl-%{version}-py?.?.egg-info

%files doc
%doc html

%changelog
* Wed May 10 2017 Miro Hrončok <mhroncok@redhat.com> - 2.2.3-1
- Updated to 2.2.3

* Wed May 03 2017 Miro Hrončok <mhroncok@redhat.com> - 2.2.2-1
- Updated to 2.2.2

* Wed May 03 2017 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-1
- Updated to 2.2.0

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Dec 30 2016 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-1
- New version with LICENSE
- Add patch for Big Endian
- Disable tests on armv7hl for now

* Sun Dec 04 2016 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-1
- Initial package