|
|
a354a25 |
%global giacver 1.9.0.59
|
|
|
d6f5d3a |
%global pypi_name giacpy
|
|
|
6429262 |
|
|
|
6429262 |
%global with_check 1
|
|
|
c78bace |
|
|
|
6429262 |
# Architectures currently not supported
|
|
|
6429262 |
# http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?f=19&t=1723
|
|
|
6429262 |
ExcludeArch: aarch64 %{power64} s390x
|
|
|
6429262 |
|
|
|
d6f5d3a |
Name: python-%{pypi_name}
|
|
|
a354a25 |
Version: 0.7.3
|
|
|
4d6ad94 |
Release: %autorelease
|
|
|
6429262 |
Summary: Python binding for Giac
|
|
|
6429262 |
License: GPLv2+
|
|
|
6429262 |
URL: http://webusers.imj-prg.fr/~frederic.han/xcas/giacpy/
|
|
|
d6f5d3a |
Source0: %pypi_source
|
|
|
6429262 |
BuildRequires: giac-devel >= %{giacver}
|
|
|
6429262 |
BuildRequires: giac-doc >= %{giacver}
|
|
|
6429262 |
BuildRequires: gmp-devel, qt5-qtsvg-devel
|
|
|
6429262 |
|
|
|
3b836bc |
# math.sin(a) test fails randomly
|
|
|
3b836bc |
Patch0: %{name}-skip_math_sin.patch
|
|
|
3b836bc |
|
|
|
6429262 |
%description
|
|
|
6429262 |
A Cython frontend to the c++ library Giac (Computer Algebra System).
|
|
|
6429262 |
|
|
|
d6f5d3a |
%package -n python3-%{pypi_name}
|
|
|
6429262 |
Summary: Python3 binding for Giac
|
|
|
d6f5d3a |
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
|
6429262 |
|
|
|
6429262 |
BuildRequires: python3-devel
|
|
|
3bc70c9 |
BuildRequires: python3-setuptools
|
|
|
fdaf00b |
BuildRequires: %{_bindir}/cython
|
|
|
6429262 |
BuildRequires: libqcas-devel
|
|
|
1895fd6 |
Requires: python3dist(cython)
|
|
|
bb29289 |
Requires: giac-doc >= %{giacver}
|
|
|
d6f5d3a |
Obsoletes: python2-%{pypi_name} < 0:%{version}
|
|
|
92203a4 |
|
|
|
d6f5d3a |
%description -n python3-%{pypi_name}
|
|
|
6429262 |
A Cython frontend to the c++ library Giac (Computer Algebra System).
|
|
|
6429262 |
|
|
|
d6f5d3a |
%package -n python3-%{pypi_name}-devel
|
|
|
d6f5d3a |
Summary: Development libraries of python3-%{pypi_name}
|
|
|
d6f5d3a |
Requires: python3-%{pypi_name}%{?_isa}
|
|
|
6429262 |
|
|
|
d6f5d3a |
%description -n python3-%{pypi_name}-devel
|
|
|
d6f5d3a |
Development libraries of Python3 %{pypi_name}.
|
|
|
6429262 |
|
|
|
6429262 |
%prep
|
|
|
d6f5d3a |
%autosetup -n %{pypi_name}-%{version} -p1
|
|
|
6429262 |
|
|
|
6429262 |
rm -rf *.egg-info
|
|
|
6429262 |
|
|
|
cf526e8 |
# Remove the cythonized files in order to regenerate them during build.
|
|
|
cf526e8 |
rm $(grep -rl '/\* Generated by Cython')
|
|
|
cf526e8 |
|
|
|
6429262 |
%build
|
|
|
959721e |
export CFLAGS="%{optflags} %(pkg-config --cflags Qt5Xml Qt5Widgets)"
|
|
|
959721e |
%py3_build -- --enable-qcas --executable="%{__python3} -s"
|
|
|
6429262 |
|
|
|
cf526e8 |
%install
|
|
|
6429262 |
%py3_install
|
|
|
d6f5d3a |
rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{pypi_name}/giacpy.cpp
|
|
|
d6f5d3a |
rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{pypi_name}/GPL-2
|
|
|
cf526e8 |
|
|
|
6429262 |
%if 0%{?with_check}
|
|
|
6429262 |
%check
|
|
|
fd8c27c |
pushd build/lib.linux-*
|
|
|
6429262 |
export PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}
|
|
|
d6f5d3a |
%{__python3} -m doctest ../../%{pypi_name}/%{pypi_name}.pyx -v
|
|
|
6429262 |
popd
|
|
|
6429262 |
%endif
|
|
|
6429262 |
|
|
|
d6f5d3a |
%files -n python3-%{pypi_name}
|
|
|
6429262 |
%doc README.txt
|
|
|
d6f5d3a |
%license %{pypi_name}/GPL-2
|
|
|
d6f5d3a |
%{python3_sitearch}/%{pypi_name}/
|
|
|
d6f5d3a |
%exclude %{python3_sitearch}/%{pypi_name}/*.h
|
|
|
d6f5d3a |
%{python3_sitearch}/%{pypi_name}*.egg-info/
|
|
|
6429262 |
|
|
|
d6f5d3a |
%files -n python3-%{pypi_name}-devel
|
|
|
d6f5d3a |
%{python3_sitearch}/%{pypi_name}/*.h
|
|
|
6429262 |
|
|
|
6429262 |
%changelog
|
|
|
4d6ad94 |
%autochangelog
|