diff --git a/astrometry.spec b/astrometry.spec index 38db853..4666fe1 100644 --- a/astrometry.spec +++ b/astrometry.spec @@ -69,9 +69,9 @@ Patch4: %{name}-0.73-Don-t-install-non-free-files-images-and-NGC2000.0-c BuildRequires: gcc BuildRequires: netpbm-devel -BuildRequires: python2-numpy -BuildRequires: python2-astropy -BuildRequires: python2-devel +BuildRequires: python3-numpy +BuildRequires: python3-astropy +BuildRequires: python3-devel BuildRequires: swig BuildRequires: xorg-x11-proto-devel @@ -177,13 +177,15 @@ Summary: Libraries for %{name} %description libs Libraries for %{name} -%package -n python2-%{name} +%package -n python3-%{name} Summary: Python modules from %{name} -Requires: python2-astropy +Requires: python3-astropy Provides: %{name}-python2 = %{version}-%{release} Obsoletes: %{name}-python2 < %{version}-%{release} +Provides: python2-%{name} = %{version}-%{release} +Obsoletes: python2-%{name} < %{version}-%{release} -%description -n python2-%{name} +%description -n python3-%{name} %{summary} @@ -218,12 +220,13 @@ make SYSTEM_GSL=yes all py extra ARCH_FLAGS="%{optflags}" %install %{make_install} SYSTEM_GSL=yes \ INSTALL_DIR=%{buildroot}%{_prefix} \ - PY_BASE_INSTALL_DIR=%{buildroot}%{python2_sitearch}/%{name} \ + PYTHON=%{__python3} \ + PY_BASE_INSTALL_DIR=%{buildroot}%{python3_sitearch}/%{name} \ INCLUDE_INSTALL_DIR=%{buildroot}%{_includedir}/%{name} \ LIB_INSTALL_DIR=%{buildroot}%{_libdir} \ BIN_INSTALL_DIR=%{buildroot}%{_bindir} \ DATA_INSTALL_DIR=%{buildroot}%{_datadir}/%{name}/data \ - PY_BASE_LINK_DIR=%{python2_sitearch}/%{name} \ + PY_BASE_LINK_DIR=%{python3_sitearch}/%{name} \ ETC_INSTALL_DIR=%{buildroot}%{_sysconfdir} \ MAN1_INSTALL_DIR=%{buildroot}%{_mandir}/man1 \ DOC_INSTALL_DIR=%{buildroot}%{_docdir}/%{name} \ @@ -250,10 +253,10 @@ rm -f %{buildroot}%{_libdir}/*.a # Fix wrong python interpreter pushd %{buildroot}%{_bindir} for exec in degtohms image2pnm removelines text2fits hmstodeg votabletofits uniformize merge-columns; do - sed -i "s,/usr/bin/env python,%{__python2},g" $exec + sed -i "s,/usr/bin/env python,%{__python3},g" $exec done popd -find %{buildroot}/%{python2_sitearch}/%{name} -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|' +find %{buildroot}/%{python3_sitearch}/%{name} -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|' # LICENSE file is managed by %%license scriptlet rm -f %{buildroot}%{_docdir}/%{name}/LICENSE @@ -310,12 +313,13 @@ make test ARCH_FLAGS="%{optflags}" %license LICENSE %{_libdir}/*.so.* -%files -n python2-%{name} -%{python2_sitearch}/* +%files -n python3-%{name} +%{python3_sitearch}/* %{_bindir}/*.py %changelog * Sat Jul 14 2018 Christian Dersch - 0.74-3 +- Switch to Python 3 - BuildRequires: gcc * Thu Jul 12 2018 Fedora Release Engineering - 0.74-2