https://bugzilla.redhat.com/show_bug.cgi?id=1526717

Robert-André Mauchin <zebo...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zebo...@gmail.com



--- Comment #1 from Robert-André Mauchin <zebo...@gmail.com> ---
 - Grab the source from Pythonhosted:

https://files.pythonhosted.org/packages/source/g/giacpy/giacpy-%{version}.tar.gz

 - I don't think the packaging is right. The main package should be
python-giacpy, with two subpackages python2-giacpy and python3-giacpy

 - The whole build process is wrong, I mean, separating python2 and python3 in
two folders, building them separately, all of this is unnecessary. See the
sample file to get an idea on how to package it:
https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

 - Here's my take on it:

%global srcname giacpy
%global giacver 1.4.9.1

# Architectures currently not supported
# http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?f=19&t=1723
ExcludeArch: aarch64 %{power64} s390x

Name:           python-%{srcname}
Version:        0.6.2
Release:        1%{?dist}
Summary:        Python binding for Giac
License:        GPLv2+
URL:            http://webusers.imj-prg.fr/~frederic.han/xcas/giacpy/
Source0:       
https://files.pythonhosted.org/packages/source/g/%{srcname}/%{srcname}-%{version}.tar.gz

%description
A Cython frontend to the c++ library Giac (Computer Algebra System)

%package -n     python2-%{srcname}
Summary:        Python2 binding for Giac
%{?python_provide:%python_provide python2-%{srcname}}

BuildRequires:  giac-devel >= %{giacver}
BuildRequires:  gmp-devel
BuildRequires:  python2-devel
BuildRequires:  python2-Cython
Requires:       qcas%{?_isa}

%description -n python2-%{srcname}
A Cython frontend to the c++ library Giac (Computer Algebra System)

%package -n     python3-%{srcname}
Summary:        Python3 binding for Giac
%{?python_provide:%python_provide python3-%{srcname}}

BuildRequires:  giac-devel >= %{giacver}
BuildRequires:  gmp-devel
BuildRequires:  python3-devel
BuildRequires:  python3-Cython
Requires:       qcas%{?_isa}

%description -n python3-%{srcname}
A Cython frontend to the c++ library Giac (Computer Algebra System)

%prep
%autosetup -n %{srcname}-%{version}
rm -rf %{srcname}.egg-info

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
pushd giacpy
export PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch}
%{__python2} -m doctest giacpy.pyx -v
export PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}
%{__python3} -m doctest giacpy.pyx -v
popd

%files -n python2-%{srcname}
%doc README.txt
%license giacpy/GPL-2
%{python2_sitearch}/%{srcname}/
%{python2_sitearch}/%{srcname}-%{version}-py?.?.egg-info/

%files -n python3-%{srcname}
%doc README.txt
%license giacpy/GPL-2
%{python3_sitearch}/%{srcname}/
%{python3_sitearch}/%{srcname}-%{version}-py?.?.egg-info/

%changelog
* Sat Dec 02 2017 Antonio Trande <sagitterATfedoraproject.org> - 0.6.2-1
- Initial package

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@lists.fedoraproject.org
To unsubscribe send an email to package-review-le...@lists.fedoraproject.org

Reply via email to