From ea24aaef68a7f81503a7110110dd2c5f183bc757 Mon Sep 17 00:00:00 2001 From: Christian Dersch Date: Oct 02 2018 15:32:57 +0000 Subject: drop python2 subpackage (#1634899) --- diff --git a/python-astroML-addons.spec b/python-astroML-addons.spec index 2a72f34..a285e39 100644 --- a/python-astroML-addons.spec +++ b/python-astroML-addons.spec @@ -1,10 +1,9 @@ %global pypi_name astroML_addons %global upname astroML-addons -%global with_python3 1 Name: python-astroML-addons Version: 0.2.2 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Performance add-ons for the astroML package License: BSD @@ -13,14 +12,9 @@ Source0: https://pypi.python.org/packages/source/a/%{pypi_name}/%{pypi_na BuildRequires: gcc -BuildRequires: python2-setuptools -BuildRequires: python2-devel -BuildRequires: python2-astroML -%if 0%{?with_python3} BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-astroML -%endif %global _description\ astroML is split into two components. The core astroML library is written\ @@ -35,14 +29,6 @@ library will import and use the faster routines by default. %description %_description -%package -n python2-astroml-addons -Summary: %summary -Requires: python2-astroML -%{?python_provide:%python_provide python2-astroml-addons} - -%description -n python2-astroml-addons %_description - -%if 0%{?with_python3} %package -n python3-%{upname} Summary: Performance add-ons for the astroML package Requires: python3-astroML @@ -57,52 +43,30 @@ counterpart in the core astroML implementation, but the astroML_addons library contains faster and more efficient implementations in compiled code. Furthermore, if astroML_addons is installed on your system, the core astroML library will import and use the faster routines by default. -%endif # with_python3 %prep %setup -qn %{pypi_name}-%{version} -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' -%endif # with_python3 - -find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' - - +find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %build -%if 0%{?with_python3} -pushd %{py3dir} -CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build -popd -%endif # with_python3 -CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build - +%py3_build %install -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd -%endif # with_python3 -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +%py3_install find %{buildroot} -name 'setup.py*' -print0 | xargs -0 rm -rf %{_fixperms} %{buildroot}/* -%files -n python2-astroml-addons -%doc README.rst -%{python2_sitearch}/astroML_addons -%{python2_sitearch}/astroML_addons-%{version}-py%{python2_version}.egg-info - %files -n python3-%{upname} %doc README.rst %{python3_sitearch}/astroML_addons %{python3_sitearch}/astroML_addons-%{version}-py%{python3_version}.egg-info %changelog +* Tue Oct 02 2018 Christian Dersch - 0.2.2-18 +- drop python2 subpackage (#1634899) + * Sun Jul 15 2018 Christian Dersch - 0.2.2-17 - BuildRequires: gcc