a8e18f0
%global	modname	fpylll
a8e18f0
a8e18f0
Name:		python-%{modname}
09de877
Version:	0.5.1dev
664a519
Release:	3%{?dist}
a8e18f0
Summary:	A Python wrapper for fplll
a8e18f0
License:	GPLv2+
79dc505
URL:		https://github.com/fplll/%{modname}
a8e18f0
Source0:	https://github.com/fplll/%{modname}/releases/download/%{version}/%{modname}-%{version}.tar.gz
ef619d2
# Adapt to mpfr 4
ef619d2
Patch0:		%{name}-mpfr4.patch
ef619d2
ef619d2
BuildRequires:	gcc
ef619d2
BuildRequires:	gcc-c++
a8e18f0
BuildRequires:	gmp-devel
a8e18f0
BuildRequires:	pari-devel
ef619d2
BuildRequires:	pkgconfig(fplll)
ef619d2
BuildRequires:	pkgconfig(mpfr)
ef619d2
BuildRequires:	pkgconfig(qd)
a8e18f0
a8e18f0
%description
a8e18f0
A Python wrapper for fplll.
a8e18f0
a8e18f0
%package	-n python3-%{modname}
a8e18f0
Summary:	A Python 3 wrapper for fplll
a8e18f0
%{?python_provide:%python_provide python3-%{modname}}
a8e18f0
BuildRequires:	python3-cysignals-devel
ef619d2
BuildRequires:	python3-devel
ef619d2
BuildRequires:	python3dist(cython)
ef619d2
BuildRequires:	python3dist(numpy)
ef619d2
BuildRequires:	python3dist(pytest)
a8e18f0
ef619d2
Requires:	python3dist(cysignals)
ef619d2
ef619d2
Recommends:	python3dist(ipython)
ef619d2
Recommends:	python3dist(matplotlib)
ef619d2
Recommends:	python3dist(numpy)
79dc505
a8e18f0
%description	-n python3-%{modname}
a8e18f0
A Python 3 wrapper for fplll.
a8e18f0
a8e18f0
%prep
6cd5c16
%autosetup -p0 -n %{modname}-%{version}
6cd5c16
6cd5c16
# Tell Cython to generate python 3 code
ef619d2
sed -i "s/\('language_level': \)2/\13/" setup.py
a8e18f0
a8e18f0
%build
ef619d2
# Do not pass -pthread to the compiler or linker
ef619d2
export CC=gcc
ef619d2
export LDSHARED="gcc -shared"
a8e18f0
%py3_build
a8e18f0
a8e18f0
%install
a8e18f0
%py3_install
a8e18f0
mkdir -p %{buildroot}%{_docdir}/%{name}
a8e18f0
a8e18f0
%check
a8e18f0
pushd tests
a8e18f0
    # Note that some tests may fail if sagemath installed and not run
a8e18f0
    # under "sage -sh" (to have environment variables defined)
09de877
    PYTHONPATH=%{buildroot}%{python3_sitearch} pytest
a8e18f0
popd
a8e18f0
a8e18f0
%files -n python3-%{modname}
a8e18f0
%license LICENSE
a8e18f0
%doc PKG-INFO README.rst
a8e18f0
%{python3_sitearch}/%{modname}
a8e18f0
%{python3_sitearch}/%{modname}-*.egg-info
a8e18f0
a8e18f0
%changelog
664a519
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.5.1dev-3
664a519
- Rebuilt for Python 3.9
664a519
eb45fe6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1dev-2
eb45fe6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
eb45fe6
09de877
* Thu Jan  9 2020 Jerry James <loganjerry@gmail.com> - 0.5.1dev-1
09de877
- Version 0.5.1dev
09de877
- Reenable test_lll
09de877
ef619d2
* Fri Nov 29 2019 Jerry James <loganjerry@gmail.com> - 0.5.0dev-1
ef619d2
- Version 0.5.0dev
ef619d2
- Drop upstreamed -time-clock patch
ef619d2
- Add -mpfr4 patch to adapt to mpfr 4
ef619d2
64dc04f
* Fri Oct 11 2019 Jerry James <loganjerry@gmail.com> - 0.4.1dev-10
64dc04f
- Rebuild for mpfr 4
64dc04f
05ad861
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.1dev-9
05ad861
- Rebuilt for Python 3.8.0rc1 (#1748018)
05ad861
f0bf64d
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.1dev-8
f0bf64d
- Rebuilt for Python 3.8
f0bf64d
5d8566c
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1dev-7
5d8566c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
5d8566c
6cd5c16
* Fri Jun 28 2019 Jerry James <loganjerry@gmail.com> - 0.4.1dev-6
6cd5c16
- Add -time-clock patch to fix FTBFS with python 3.8 (bz 1718334)
6cd5c16
- Pass language_level: 3 to cython
6cd5c16
c293695
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1dev-5
c293695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c293695
e1426d8
* Fri Jan 04 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.1dev-4
e1426d8
- Subpackage python2-fpylll has been removed
e1426d8
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
e1426d8
c3a6db2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1dev-3
c3a6db2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
c3a6db2
2c63701
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.1dev-2
2c63701
- Rebuilt for Python 3.7
2c63701
79dc505
* Sat Jun  2 2018 Jerry James <loganjerry@gmail.com> - 0.4.1dev-1
79dc505
- Update to 0.4.1dev for libfplll 5.2.1
79dc505
- BR python-flake8
79dc505
- R python-cysignals and numpy
79dc505
9569f11
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4dev-2
9569f11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9569f11
479386c
* Thu Sep 28 2017 Jerry James <loganjerry@gmail.com> - 0.2.4dev-1
479386c
- Update to 0.2.4dev for libfplll 5.1.0
479386c
f3fb80f
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3dev-4
f3fb80f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f3fb80f
a7e5aae
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3dev-3
a7e5aae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a7e5aae
a8e18f0
* Thu Apr 27 2017 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.2.3dev-2
a8e18f0
- Add missing changelog
a8e18f0
- Add missing URL
a8e18f0
- Add python provides to python3 subpackage
a8e18f0
- Correct mixed tabs and spaces in the spec
a8e18f0
- Implement %%check using pytest
a8e18f0
- Add numpy Build Requires
a8e18f0
- Add LICENSE as extra source
a8e18f0
a8e18f0
* Thu Apr 27 2017 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.2.3dev-1
a8e18f0
- Initial python-fpylll spec