Blob Blame History Raw
%global srcname fiat

Name:           python-%{srcname}
Version:        1.6.0
Release:        5%{?dist}
Summary:        Generation of arbitrary order instances of the Lagrange elements

License:        LGPLv2+
URL:            http://www.fenicsproject.org
Source0:        https://bitbucket.org/fenics-project/fiat/downloads/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python3-devel

# This is needed for building the manual:
BuildRequires:  tex(latex)
%if (0%{?rhel} && 0%{?rhel} >= 7) || 0%{?fedora}
BuildRequires:  texlive-collection-latexextra
%endif

%global _docdir_fmt %{name}

%description
The FInite element Automatic Tabulator FIAT supports generation of
arbitrary order instances of the Lagrange elements on lines, triangles,
and tetrahedra.
It is also capable of generating arbitrary order instances of Jacobi-
type quadrature rules on the same element shapes. Upcoming versions
will also support Hermite and nonconforming elements as well as H(div)
and H(curl) elements such as Raviart-Thomas and Nedelec are supported
on triangles and tetrahedra.

%package -n python2-%{srcname}
Summary:        %{summary}
Requires:	numpy
Requires:	sympy

%description -n python2-%{srcname}
The FInite element Automatic Tabulator FIAT supports generation of
arbitrary order instances of the Lagrange elements on lines, triangles,
and tetrahedra.
It is also capable of generating arbitrary order instances of Jacobi-
type quadrature rules on the same element shapes. Upcoming versions
will also support Hermite and nonconforming elements as well as H(div)
and H(curl) elements such as Raviart-Thomas and Nedelec are supported
on triangles and tetrahedra.

%package -n python3-%{srcname}
Summary:        %{summary}
Requires:	python3-numpy
Requires:	python3-sympy

%description -n python3-%{srcname}
The FInite element Automatic Tabulator FIAT supports generation of
arbitrary order instances of the Lagrange elements on lines, triangles,
and tetrahedra.
It is also capable of generating arbitrary order instances of Jacobi-
type quadrature rules on the same element shapes. Upcoming versions
will also support Hermite and nonconforming elements as well as H(div)
and H(curl) elements such as Raviart-Thomas and Nedelec are supported
on triangles and tetrahedra.

%prep
%setup -q -n %{srcname}-%{version}

%build
%py3_build
%py2_build

pushd doc
pdflatex manual.tex
popd

%install
%py3_install
%py2_install

# These scripts are executables, so move to /usr/bin
install -d %{buildroot}%{_bindir}
sed -i '0,/#!.usr.bin.env python/{//d;}; 1 i\#!%{__python2}' \
    %{buildroot}%{python2_sitelib}/FIAT/asci2vtk{2,3}d.py
chmod +x %{buildroot}%{python2_sitelib}/FIAT/asci2vtk{2,3}d.py
ln -s %{python2_sitelib}/FIAT/asci2vtk{2,3}d.py %{buildroot}%{_bindir}/

%files -n python2-%{srcname}
%license COPYING
%doc AUTHORS ChangeLog README doc/manual.pdf
%{python2_sitelib}/FIAT/
%{python2_sitelib}/*.egg-info
%{_bindir}/*

%files -n python3-%{srcname}
%license COPYING
%doc AUTHORS ChangeLog README doc/manual.pdf
%{python3_sitelib}/FIAT/
%{python3_sitelib}/*.egg-info

%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Oct 15 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@laptop> - 1.6.0-2
- Remove unneeded PythonScientific dependency
- Convert to modern python packaging format and add python3 subpackage

* Sun Oct 11 2015 Fabian Affolter <mail@fabian-affolter.ch> - 1.6.0-1
- Update to new upstream 1.6.0 (rhbz#1247601)

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Mar 03 2015 Fabian Affolter <mail@fabian-affolter.ch> - 1.5.0.-1
- Update to new upstream 1.6.0 (rhbz#1247601)

* Thu Jul 31 2014 Fabian Affolter <mail@fabian-affolter.ch> - 1.4.0.-1
- Spec file update
- Update to new upstream 1.4.0

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Jan 24 2013 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.1.0-1
- Update to version 1.1.0
- Fix the BuildRequires for LaTeX for F18 and beyond

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sun May 13 2012 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.0-3
- Add Requires: ScientificPython

* Thu May  3 2012 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.0-2
- Build PDF of the manual
- Move executable scripts to %%{_bindir}

* Sat Feb 11 2012 Fabian Affolter <mail@fabian-affolter.ch> - 1.0.0.-1
- Update to new upstream 1.0.0

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Mar 27 2011 Fabian Affolter <mail@fabian-affolter.ch> - 0.9.9-1
- Update URL and description
- Update to new upstream version 0.9.9

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sat Jul 03 2010 Fabian Affolter <mail@fabian-affolter.ch> - 0.9.2-1
- Update to new upstream version 0.9.2
- Update source url

* Tue Feb 23 2010 Fabian Affolter <mail@fabian-affolter.ch> - 0.9.1-1
- Change source URL
- Add docs
- Update to new upsteram version 0.9.1

* Sun Dec 06 2009 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.5-1
- Update to new upsteram version 0.3.5

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 04 2009 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.4-2
- Fix license tag -> LGPLv2+

* Fri Jan 30 2009 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.4-1
- Initial package for Fedora