%global srcname ufl # TODO: sphinx docs, man page names Name: python-%{srcname} Version: 2017.2.0 Release: 0%{?dist} Summary: A compiler for finite element variational forms License: LGPLv3+ URL: http://www.fenicsproject.org Source0: https://bitbucket.org/fenics-project/ufl/downloads/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python3-devel %description The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation. %package -n python2-%{srcname} Summary: A compiler for finite element variational forms %{?python_provide:%python_provide python2-%{srcname}} %package -n python3-%{srcname} Summary: A compiler for finite element variational forms %{?python_provide:%python_provide python3-%{srcname}} %description -n python2-%{srcname} The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation. %description -n python3-%{srcname} The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation. %package -n python2-ufl-demo Summary: Demo files for %{name} Requires: python2-%{srcname} = %{version}-%{release} %description -n python2-ufl-demo The %{name}-demo package contains demo files for %{name}. %package -n python3-ufl-demo Summary: Demo files for %{name} Requires: python3-%{srcname} = %{version}-%{release} %description -n python3-ufl-demo The %{name}-demo package contains demo files for %{name}. %package -n python2-ufl-test Summary: Test files for %{name} Requires: python2-%{srcname} = %{version}-%{release} Requires: python2-nose %package -n python3-ufl-test Summary: Test files for %{name} Requires: python3-%{srcname} = %{version}-%{release} Requires: python3-nose %description -n python2-ufl-test The %{name}-test package contains test files for %{name}. %description -n python3-ufl-test The %{name}-test package contains test files for %{name}. %prep %autosetup -n %{srcname}-%{version} # Fix permissions chmod +x test/test_*.py # Fix typo sed -i -e 's|#!/use/bin/env|#!/usr/bin/env|g' test/test_measures.py %build %py2_build %py3_build %install %py2_install mkdir %{buildroot}%{python2_sitelib}/%{srcname}/demo/ install -Dp -m 0644 demo/* %{buildroot}%{python2_sitelib}/%{srcname}/demo/ for f in %{buildroot}/%{_bindir}/ufl*; do mv $f %{buildroot}/%{_bindir}/python2-$(basename $f); done mkdir %{buildroot}%{python2_sitelib}/%{srcname}/test/ cp -R test/* %{buildroot}%{python2_sitelib}/%{srcname}/test/ chmod +x %{buildroot}%{python2_sitelib}/%{srcname}/demo/clean.sh %py3_install mkdir %{buildroot}%{python3_sitelib}/%{srcname}/demo/ install -Dp -m 0644 demo/* %{buildroot}%{python3_sitelib}/%{srcname}/demo/ for f in %{buildroot}/%{_bindir}/ufl*; do mv $f %{buildroot}/%{_bindir}/python3-$(basename $f); done mkdir %{buildroot}%{python3_sitelib}/%{srcname}/test/ cp -R test/* %{buildroot}%{python3_sitelib}/%{srcname}/test/ chmod +x %{buildroot}%{python3_sitelib}/%{srcname}/demo/clean.sh %files -n python2-%{srcname} %doc ChangeLog.rst README.rst %license COPYING COPYING.LESSER %{_mandir}/man1/*.* %{_bindir}/python2-ufl* %{python2_sitelib}/%{srcname}/ %{python2_sitelib}/fenics_ufl*.egg-info %exclude %{python2_sitelib}/%{srcname}/demo/ %exclude %{python2_sitelib}/%{srcname}/test/ %files -n python2-%{srcname}-demo %doc COPYING.LESSER %{python2_sitelib}/%{srcname}/demo/ %files -n python2-%{srcname}-test %doc COPYING.LESSER %{python2_sitelib}/%{srcname}/test/ %files -n python3-%{srcname} %doc ChangeLog.rst README.rst %license COPYING COPYING.LESSER %{_mandir}/man1/*.* %{_bindir}/python3-ufl* %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/fenics_ufl*.egg-info %exclude %{python3_sitelib}/%{srcname}/demo/ %exclude %{python3_sitelib}/%{srcname}/test/ %files -n python3-%{srcname}-demo %doc COPYING.LESSER %{python3_sitelib}/%{srcname}/demo/ %files -n python3-%{srcname}-test %doc COPYING.LESSER %{python3_sitelib}/%{srcname}/test/ %changelog * Thu Apr 05 2018 Eldar Yusupov - 2017.2.0 - Update to latest upstream release 2017.2.0 - Build python2 pacakges * Fri Feb 09 2018 Fedora Release Engineering - 1.6.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.6.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.6.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro HronĨok - 1.6.0-5 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 1.6.0-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sat Nov 21 2015 Kalev Lember - 1.6.0-2 - Fix broken dependencies for demo and test subpackages * Sun Nov 15 2015 Fabian Affolter - 1.6.0-1 - Cleanup - Update to latest upstream release 1.6.0 (rhbz#1181552) * Thu Jun 18 2015 Fedora Release Engineering - 1.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Feb 01 2015 Fabian Affolter - 1.5.0-1 - Update to latest upstream release 1.5.0 (rhbz#1181552) * Thu Aug 14 2014 Fabian Affolter - 1.4.0-2 - Remove duplicate files - Fix typo * Thu Jul 31 2014 Fabian Affolter - 1.4.0-1 - Update python macros - Update source URL - Update to latest upstream release 1.4.0 * Sat Jun 07 2014 Fedora Release Engineering - 1.0.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 1.0.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 1.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sun Nov 18 2012 Fabian Affolter - 1.0.0-4 - License file added to subpackages - Removed check section - Other minor changes * Fri Apr 13 2012 Fabian Affolter - 1.0.0-3 - License issue fixed - Test subpackage - Demo subpackage * Sun Mar 25 2012 Fabian Affolter - 1.0.0-2 - Minor changes * Sun Mar 04 2012 Fabian Affolter - 1.0.0-1 - Updated to new upstream version 1.0.0 * Sat Mar 26 2011 Fabian Affolter - 0.1-0.1.pre - Initial package