%global modname fpylll Name: python-%{modname} Version: 0.2.3dev Release: 2%{?dist} Summary: A Python wrapper for fplll License: GPLv2+ URL: https://github.com/fplll Source0: https://github.com/fplll/%{modname}/releases/download/%{version}/%{modname}-%{version}.tar.gz # The LICENSE file is included in 0.2.4dev # But for the moment, packaging 0.2.3dev as it is the version # required by sagemath 7.6 Source1: https://raw.githubusercontent.com/fplll/fpylll/master/LICENSE BuildRequires: gmp-devel BuildRequires: libfplll-devel BuildRequires: mpfr-devel BuildRequires: pari-devel BuildRequires: qd-devel Patch0: %{name}-check.patch %description A Python wrapper for fplll. %package -n python2-%{modname} Summary: A Python 2 wrapper for fplll %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-Cython BuildRequires: python2-cysignals-devel BuildRequires: python2-numpy BuildRequires: python2-pytest %description -n python2-%{modname} A Python 2 wrapper for fplll. %package -n python3-%{modname} Summary: A Python 3 wrapper for fplll %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-Cython BuildRequires: python3-cysignals-devel BuildRequires: python3-numpy BuildRequires: python3-pytest %description -n python3-%{modname} A Python 3 wrapper for fplll. %prep %setup -q -n %{modname}-%{version} %patch0 cp -p %{SOURCE1} . %build %py2_build %py3_build %install %py2_install %py3_install mkdir -p %{buildroot}%{_docdir}/%{name} %check pushd tests # Note that some tests may fail if sagemath installed and not run # under "sage -sh" (to have environment variables defined) PYTHONPATH=%{buildroot}%{python2_sitearch} pytest-2 PYTHONPATH=%{buildroot}%{python3_sitearch} pytest-3 popd %files -n python2-%{modname} %license LICENSE %doc PKG-INFO README.rst %{python2_sitearch}/%{modname} %{python2_sitearch}/%{modname}-*.egg-info %files -n python3-%{modname} %license LICENSE %doc PKG-INFO README.rst %{python3_sitearch}/%{modname} %{python3_sitearch}/%{modname}-*.egg-info %changelog * Thu Apr 27 2017 pcpa - 0.2.3dev-2 - Add missing changelog - Add missing URL - Add python provides to python3 subpackage - Correct mixed tabs and spaces in the spec - Implement %%check using pytest - Add numpy Build Requires - Add LICENSE as extra source * Thu Apr 27 2017 pcpa - 0.2.3dev-1 - Initial python-fpylll spec