Adapt to new upstream tarball paths.
This commit is contained in:
parent
c13b7b41b9
commit
b246b4b919
@ -11,7 +11,7 @@ Summary: Python interface to GMP, MPFR, and MPC
|
||||
|
||||
License: LGPLv3+
|
||||
URL: https://pypi.python.org/pypi/gmpy2
|
||||
Source0: https://github.com/aleaxit/gmpy/archive/%{srcname}-%{version}.tar.gz
|
||||
Source0: https://github.com/aleaxit/gmpy/archive/%{srcname}-%{version}a2.tar.gz
|
||||
# Fix an import issue; git commit cb0d591
|
||||
Patch0: %{srcname}-import.patch
|
||||
|
||||
@ -67,7 +67,8 @@ Provides: bundled(jquery)
|
||||
%prep
|
||||
%setup -q -c
|
||||
|
||||
pushd %{srcname}-%{version}
|
||||
mv gmpy-%{srcname}-%{version}a2 python2
|
||||
pushd python2
|
||||
%patch0
|
||||
|
||||
# Fix file encodings. First the easy one.
|
||||
@ -83,25 +84,25 @@ popd
|
||||
|
||||
%if 0%{?fedora} >= 24
|
||||
# Update the sphinx theme name
|
||||
sed -i "s/'default'/'alabaster'/" %{srcname}-%{version}/docs/conf.py
|
||||
sed -i "s/'default'/'alabaster'/" python2/docs/conf.py
|
||||
%endif
|
||||
|
||||
%if 0%{?with_py3}
|
||||
# Prepare for a python3 build
|
||||
cp -a %{srcname}-%{version} python3-%{srcname}-%{version}
|
||||
sed -i 's/sphinx-build/&-3/' python3-%{srcname}-%{version}/docs/Makefile
|
||||
cp -a python2 python3
|
||||
sed -i 's/sphinx-build/&-3/' python3/docs/Makefile
|
||||
%endif
|
||||
|
||||
%build
|
||||
# Python 2 build
|
||||
pushd %{srcname}-%{version}
|
||||
pushd python2
|
||||
%py2_build
|
||||
make -C docs html
|
||||
popd
|
||||
|
||||
%if 0%{?with_py3}
|
||||
# Python 3 build
|
||||
pushd python3-%{srcname}-%{version}
|
||||
pushd python3
|
||||
%py3_build
|
||||
make -C docs html
|
||||
popd
|
||||
@ -109,39 +110,39 @@ popd
|
||||
|
||||
%install
|
||||
# Python 2 install
|
||||
pushd %{srcname}-%{version}
|
||||
pushd python2
|
||||
%py2_install
|
||||
popd
|
||||
|
||||
%if 0%{?with_py3}
|
||||
# Python 3 install
|
||||
pushd python3-%{srcname}-%{version}
|
||||
pushd python3
|
||||
%py3_install
|
||||
popd
|
||||
%endif
|
||||
|
||||
%check
|
||||
# Python 2 tests
|
||||
pushd %{srcname}-%{version}
|
||||
pushd python2
|
||||
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} test/runtests.py
|
||||
popd
|
||||
|
||||
%if 0%{?with_py3}
|
||||
# Python 3 tests
|
||||
pushd python3-%{srcname}-%{version}
|
||||
pushd python3
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} test/runtests.py
|
||||
popd
|
||||
%endif
|
||||
|
||||
%files -n python2-%{srcname}
|
||||
%license %{srcname}-%{version}/COPYING %{srcname}-%{version}/COPYING.LESSER
|
||||
%doc %{srcname}-%{version}/docs/_build/html/*
|
||||
%license python2/COPYING python2/COPYING.LESSER
|
||||
%doc python2/docs/_build/html/*
|
||||
%{python2_sitearch}/%{srcname}*
|
||||
|
||||
%if 0%{?with_py3}
|
||||
%files -n python3-%{srcname}
|
||||
%license %{srcname}-%{version}/COPYING %{srcname}-%{version}/COPYING.LESSER
|
||||
%doc python3-%{srcname}-%{version}/docs/_build/html/*
|
||||
%license python3/COPYING python3/COPYING.LESSER
|
||||
%doc python3/docs/_build/html/*
|
||||
%{python3_sitearch}/%{srcname}*
|
||||
%endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user