update to 3.0.1

rpy >= 3.0.0 requires python3
add a %chech section (commented because the tests are present in the release)
This commit is contained in:
José Matos 2019-03-04 20:47:13 +00:00
parent f73f94bc0d
commit 34344d0174

View File

@ -2,10 +2,6 @@
%global sum Python interface to the R language
%global rver 3.5.2
%if 0%{?fedora} < 30
%global python2 1
%endif
Name: rpy
Version: 3.0.1
Release: 1%{?dist}
@ -18,10 +14,6 @@ Source: https://files.pythonhosted.org/packages/source/r/%{srcname}2/%{sr
BuildArch: noarch
BuildRequires: R-devel = %{rver}
%if 0%{?python2}
BuildRequires: python2-setuptools, python2-devel
BuildRequires: python2-pytest
%endif
BuildRequires: python3-setuptools, python3-devel, python3-cffi
BuildRequires: python3-numpy
BuildRequires: readline-devel
@ -35,23 +27,6 @@ programming language. It can manage all kinds of R objects and can
execute arbitrary R functions. All the errors from the R language are
converted to Python exceptions.
%if 0%{?python2}
%package -n python2-%{srcname}
Summary: %{sum}
#Requires: python2-numpy
Requires: numpy
Requires: R-core = %{rver}
Requires: python2-six, python2-jinja2
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
RPy provides a robust Python interface to the R
programming language. It can manage all kinds of R objects and can
execute arbitrary R functions. All the errors from the R language are
converted to Python exceptions.
%endif
%package -n python3-%{srcname}
Summary: %{sum}
Requires: python3-numpy
@ -73,32 +48,20 @@ converted to Python exceptions.
# Temporary workaround to fix a bug in R
# see https://stat.ethz.ch/pipermail/r-devel/2016-December/073548.html
export CFLAGS="$RPM_OPT_FLAGS -DHAVE_UINTPTR_T=1"
%if 0%{?python2}
%py2_build
%endif
%py3_build
%install
%if 0%{?python2}
%py2_install
%endif
%py3_install
%check
%if 0%{?python2}
pytest-2 tests/
%endif
pytest-3 tests/
# The test are not present in the release
# https://bitbucket.org/rpy2/rpy2/issues/528/please-ship-tests-along-with-the-release
#cd %{name}
#pytest-3 tests.py
%files
%if 0%{?python2}
%files -n python2-%{srcname}
%doc AUTHORS NEWS PKG-INFO
%license gpl-2.0.txt
%{python2_sitelib}/%{srcname}*
%endif
%files -n python3-%{srcname}
%doc AUTHORS NEWS PKG-INFO
%license gpl-2.0.txt
@ -110,8 +73,8 @@ pytest-3 tests/
%changelog
* Mon Mar 4 2019 José Matos <jamatos@fedoraproject.org> - 3.0.1-1
- update to 3.0.1
- add conditional python2 subpackages for fedora < 30
- add a %%chech section
- rpy >= 3.0.0 requires python3
- add a %%chech section (commented because the tests are present in the release)
* Wed Feb 27 2019 José Matos <jamatos@fedoraproject.org> - 3.0.0-1
- update to 3.0.0