133 lines
3.6 KiB
RPMSpec
133 lines
3.6 KiB
RPMSpec
%global pypi_name admesh
|
|
%global with_python3 1
|
|
|
|
Name: python-%{pypi_name}
|
|
Version: 0.98.5
|
|
Release: 3%{?dist}
|
|
Summary: Python bindings for ADMesh, STL manipulation library
|
|
|
|
License: GPLv2+
|
|
URL: https://github.com/admesh/python-admesh
|
|
Source0: https://pypi.python.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: pytest
|
|
BuildRequires: Cython
|
|
BuildRequires: admesh-devel >= 0.98
|
|
|
|
%if %{?with_python3}
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-pytest
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python3-Cython
|
|
%endif # if with_python3
|
|
|
|
|
|
%description
|
|
This module provides bindings for the ADMesh library.
|
|
It lets you manipulate 3D models in binary or ASCII STL
|
|
format and partially repair them if necessary.
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
%package -n python3-%{pypi_name}
|
|
Summary: Python 3 bindings for ADMesh, STL maipulation library
|
|
|
|
|
|
%description -n python3-%{pypi_name}
|
|
This module provides bindings for the ADMesh library.
|
|
It lets you manipulate 3D models in binary or ASCII STL
|
|
format and partially repair them if necessary.
|
|
%endif # with_python3
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{pypi_name}-%{version}
|
|
# Remove bundled egg-info
|
|
rm -rf %{pypi_name}.egg-info
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
rm -rf %{py3dir}
|
|
cp -a . %{py3dir}
|
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
%build
|
|
%{__python2} setup.py build
|
|
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py build
|
|
popd
|
|
%endif # with_python3
|
|
|
|
|
|
%install
|
|
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
popd
|
|
%endif # with_python3
|
|
|
|
%check
|
|
export PYTHONPATH=`echo build/lib.linux-*/`
|
|
py.test-%{python2_version} -v
|
|
|
|
%if 0%{?with_python3}
|
|
pushd %{py3dir}
|
|
export PYTHONPATH=`echo build/lib.linux-*/`
|
|
py.test-%{python3_version} -v
|
|
popd
|
|
%endif # with_python3
|
|
|
|
%files
|
|
%doc README.rst COPYING
|
|
%attr(0755,root,root) %{python2_sitearch}/%{pypi_name}.so
|
|
%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
|
%if 0%{?with_python3}
|
|
%files -n python3-%{pypi_name}
|
|
%doc README.rst COPYING
|
|
%attr(0755,root,root) %{python3_sitearch}/%{pypi_name}.*.so
|
|
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
%endif # with_python3
|
|
|
|
|
|
%changelog
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.98.5-3
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.98.5-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Tue Dec 08 2015 Miro Hrončok <mhroncok@redhat.com> - 0.98.5-1
|
|
- New version 0.98.5, fix FTBFS
|
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.98.3-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.98.3-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Wed Feb 25 2015 Miro Hrončok <mhroncok@redhat.com> - 0.98.3-1
|
|
- New version 0.98.3
|
|
|
|
* Wed Sep 03 2014 Miro Hrončok <mhroncok@redhat.com> - 0.98.1-1
|
|
- New version
|
|
- Run tests, add BR pytest
|
|
|
|
* Wed Sep 03 2014 Miro Hrončok <mhroncok@redhat.com> - 0.98-3
|
|
- Set correct executable permissions
|
|
- Typo in summary
|
|
|
|
* Thu Jul 31 2014 Miro Hrončok <mhroncok@redhat.com> - 0.98-2
|
|
- Require setuptools.
|
|
|
|
* Tue Jul 29 2014 Miro Hrončok <mhroncok@redhat.com> - 0.98-1
|
|
- Initial package.
|