From 9bf81671d8d99f2898cb13c90959195f3720a214 Mon Sep 17 00:00:00 2001 From: Dominika Krejčí Date: Sep 07 2016 10:45:50 +0000 Subject: Add Python3 --- diff --git a/pyephem.spec b/pyephem.spec index c777eef..06d1fa4 100644 --- a/pyephem.spec +++ b/pyephem.spec @@ -1,50 +1,90 @@ -%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)') +Name: pyephem +Version: 3.7.6.0 +Release: 4%{?dist} +Summary: The astronomy library for Python -Name: pyephem -Version: 3.7.6.0 -Release: 3%{?dist} -Summary: The astronomy library for Python +Group: Development/Libraries +License: LGPLv3 +URL: http://rhodesmill.org/%{name}/ +Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz -Group: Development/Libraries -License: LGPLv3 -URL: http://rhodesmill.org/pyephem/ -Source0: http://pypi.python.org/packages/source/p/pyephem/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: python2-devel +BuildRequires: python2-unittest2 -BuildRequires: python-devel, python-unittest2 +BuildRequires: python3-devel +BuildRequires: python3-unittest2 %description PyEphem provides scientific-grade astronomical computations for the Python programming language. + +%package -n python2-%{name} +Summary: %{sum} +%{?python_provide:%python_provide python2-%{name}} + +%description -n python2-%{name} +PyEphem provides scientific-grade astronomical +computations for the Python 2 programming language. + + +%package -n python3-%{name} +Summary: %{sum} +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +PyEphem provides scientific-grade astronomical +computations for the Python 3 programming language. + + %prep %setup -q + %build -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +%py2_build +%py3_build + %install rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT +%py2_install +%py3_install + #%%check #%%{__python} -m unittest discover # tests disabled as they're hardcoded to certain timezones # see https://bugs.launchpad.net/pyephem/+bug/710602 + %clean rm -rf $RPM_BUILD_ROOT -%files + +%files -n python2-%{name} +%defattr(-,root,root,-) +%doc COPYING INSTALL LICENSE-GPL PKG-INFO README.rst +%license LICENSE-LGPL +%{python2_sitearch}/ephem +%{python2_sitearch}/*egg-info +%exclude %{python2_sitearch}/ephem/tests + +%files -n python3-%{name} %defattr(-,root,root,-) -%doc COPYING INSTALL LICENSE-GPL LICENSE-LGPL PKG-INFO README.rst -%{python_sitearch}/ephem -%{python_sitearch}/*egg-info -%exclude %{python_sitearch}/ephem/tests +%doc COPYING INSTALL LICENSE-GPL PKG-INFO README.rst +%license LICENSE-LGPL +%{python3_sitearch}/ephem +%{python3_sitearch}/*egg-info +%exclude %{python3_sitearch}/ephem/tests %changelog +* Wed Jul 27 2016 Dominika Krejci - 3.7.6.0-4 +- Add Python3 + * Tue Jul 19 2016 Fedora Release Engineering - 3.7.6.0-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages