27163f2
Name:           python-ffc
27163f2
Version:        2019.1.0.post0
27163f2
%global fenics_version 2019.1
f242538
Release:        %autorelease
27163f2
Summary:        Compiler for finite element variational forms
27163f2
8faa21b
License:        LGPL-3.0-or-later
27163f2
URL:            https://fenics-ffc.readthedocs.org/
27163f2
Source0:        https://bitbucket.org/fenics-project/ffc/downloads/ffc-%{version}.tar.gz
27163f2
Source1:        https://bitbucket.org/fenics-project/ffc/downloads/ffc-%{version}.tar.gz.asc
27163f2
Source2:        3083BE4C722232E28AD0828CBED06106DD22BAB3.gpg
27163f2
89c7886
Patch0:         https://bitbucket.org/fenics-project/ffc/commits/8d80c72468282e35fd5476b42c5c03595cd38e99/raw#/8d80c72468282e35fd5476b42c5c03595cd38e99.patch
89c7886
27163f2
BuildArch:      noarch
27163f2
BuildRequires:  python3-devel
47e3b47
BuildRequires:  python3dist(setuptools)
27163f2
BuildRequires:  python3dist(pytest)
27163f2
BuildRequires:  python3dist(numpy)
27163f2
BuildRequires:  python3dist(fenics-fiat) >= %{fenics_version}
27163f2
BuildRequires:  python3dist(fenics-ufl) >= %{fenics_version}
27163f2
BuildRequires:  python3dist(fenics-dijitso) >= %{fenics_version}
27163f2
BuildRequires:  cmake
27163f2
BuildRequires:  gnupg2
27163f2
# Note: a copy of gtest is bundled and used for tests during build. It
27163f2
# could be unbundled, but I don't think this is worth the trouble in
27163f2
# this case.
27163f2
27163f2
%global _description %{expand:
27163f2
The FEniCS Form Compiler FFC is a compiler for finite element
27163f2
variational forms, translating high-level mathematical descriptions of
27163f2
variational forms into efficient low-level C++ code for finite element
27163f2
assembly.}
27163f2
27163f2
%description %_description
27163f2
27163f2
%package -n python3-ffc
27163f2
Summary: %summary
27163f2
%{?python_provides python3-ffc}
27163f2
27163f2
%description -n python3-ffc %_description
27163f2
27163f2
%prep
27163f2
%{?gpgverify:%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'}
27163f2
27163f2
%autosetup -n ffc-%{version} -p1
27163f2
27163f2
sed -r -i '1d' ffc/__main__.py ffc/main.py
27163f2
27163f2
%build
27163f2
%py3_build
27163f2
27163f2
%install
27163f2
%py3_install
27163f2
27163f2
%check
f50bff1
OPTIONS=(
f50bff1
  # test_evaluate.py uses libs/ffc-factory, which is currently ignored
f50bff1
  --ignore=test/unit/ufc/finite_element/test_evaluate.py
f50bff1
)
f50bff1
%python3 -m pytest -v test/ "${OPTIONS[@]}"
27163f2
27163f2
%files -n python3-ffc
27163f2
%license COPYING COPYING.LESSER
27163f2
%doc README.rst ChangeLog.rst AUTHORS
27163f2
%doc demo
f50bff1
%{_bindir}/ffc
f50bff1
%{_bindir}/ffc-3
27163f2
%{python3_sitelib}/ffc
27163f2
%{python3_sitelib}/fenics_ffc-%{version}-py%{python3_version}.egg-info/
27163f2
%{_mandir}/man1/ffc.1*
27163f2
27163f2
%changelog
f242538
%autochangelog