Blob Blame History Raw
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%global with_python3 1
%else
%{!?python_sitearch: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")}
%endif

Name: pymilia
Version: 1.0.0
Release: 19%{?dist}
Summary: Python wrappers for milia
License: GPLv3+

Group: Development/Languages
URL: http://guaix.fis.ucm.es/projects/pymilia/wiki
Source0: ftp://astrax.fis.ucm.es/pub/software/pymilia/%{name}-%{version}.tar.gz

BuildRequires: python-devel python-setuptools 
BuildRequires: Cython milia-devel >= 1.0.0

# we don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python2_sitearch}/.*\.so$ 
%filter_setup
}

%global _description\
Python wrappers for milia. Milia is a C++ library created to\
compute cosmological distances and ages in the\
Friedmann-Lemaître-Robertson-Walker metric.

%description %_description

%package -n python2-pymilia
Summary: %summary
Provides: python2-pymilia
%{?python_provide:%python_provide python2-pymilia}
# Remove before F30
Provides: pymilia = %{version}-%{release}
Provides: pymilia%{?_isa} = %{version}-%{release}
Obsoletes: pymilia < %{version}-%{release}

%description -n python2-pymilia %_description

%if 0%{?with_python3}
%package -n python3-pymilia
Summary: Python wrappers for milia
BuildRequires: python3-devel python3-setuptools 
BuildRequires: python3-Cython milia-devel >= 1.0.0

# we don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python3_sitearch}/.*\.so$
%filter_setup
}

%description -n python3-pymilia 
Python wrappers for milia. Milia is a C++ library created to 
compute cosmological distances and ages in the 
Friedmann-Lemaître-Robertson-Walker metric.
%endif # with_python3

%prep
%setup -q

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
CFLAGS="%{optflags}" %{__python2} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd
%endif # with_python3

%install
rm -rf %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
chmod 755 %{buildroot}%{python3_sitearch}/milia/*.so
popd
%endif # with_python3

%{__python2} setup.py install --skip-build --root %{buildroot}
chmod 755 %{buildroot}%{python2_sitearch}/milia/*.so
 
%files -n python2-pymilia
%doc README.txt NEWS.txt
%license LICENSE.txt
%{python2_sitearch}/milia/
%{python2_sitearch}/*.egg-info

%if 0%{?with_python3}
%files -n python3-pymilia
%doc README.txt NEWS.txt
%license LICENSE.txt
%{python3_sitearch}/milia/
%{python3_sitearch}/*.egg-info
%endif # with_python3

%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.0-18
- Add Provides for the old name without %%_isa

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.0-17
- Python 2 binary package renamed to python2-pymilia
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.0.0-14
- Rebuild due to bug in RPM (RHBZ #1468476)

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-12
- Rebuild for Python 3.6

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

* Sun Feb 28 2016 Kalev Lember <kalevlember@gmail.com> - 1.0.0-10
- Rebuilt for new milia

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

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

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

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.0-6
- Rebuilt for GCC 5 C++11 ABI change

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

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

* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

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

* Fri Apr 05 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 1.0.0-1
- New upstream source
- Adding support for python3

* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-16
- Rebuild for Boost-1.53.0

* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.3.0-15
- Rebuild for Boost-1.53.0

* Mon Aug 13 2012 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.0-14
- Rebuilt for new boost 1.50

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

* Thu May 20 2012 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.0-12
- Rebuilt for new milia

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

* Thu Nov 24 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.0-10
- Rebuilt for new boost 1.48

* Tue Aug 23 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.0-9
- Added filter to remove false provides

* Thu Apr 07 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.0-8
- Rebuilt for new boost

* Thu Mar 17 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.0-7
- Rebuilt for new boost

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

* Sun Feb 06 2011 Thomas Spura <tomspur@fedoraproject.org> - 0.3.0-5
- rebuild for new boost

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed Jan 20 2010 Sergio Pascual <sergiopr at fedoraproject.com> - 0.3.0-3
- Adding CFLAGS in build line

* Wed Jan 20 2010 Sergio Pascual <sergiopr at fedoraproject.com> - 0.3.0-2
- Updated build requires
- Corrected minor typos

* Mon Jan 18 2010 Sergio Pascual <sergiopr at fedoraproject.com> - 0.3.0-1
- Initial spec file