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+
|
License: LGPLv3+
|
||||||
URL: https://pypi.python.org/pypi/gmpy2
|
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
|
# Fix an import issue; git commit cb0d591
|
||||||
Patch0: %{srcname}-import.patch
|
Patch0: %{srcname}-import.patch
|
||||||
|
|
||||||
@ -67,7 +67,8 @@ Provides: bundled(jquery)
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -c
|
%setup -q -c
|
||||||
|
|
||||||
pushd %{srcname}-%{version}
|
mv gmpy-%{srcname}-%{version}a2 python2
|
||||||
|
pushd python2
|
||||||
%patch0
|
%patch0
|
||||||
|
|
||||||
# Fix file encodings. First the easy one.
|
# Fix file encodings. First the easy one.
|
||||||
@ -83,25 +84,25 @@ popd
|
|||||||
|
|
||||||
%if 0%{?fedora} >= 24
|
%if 0%{?fedora} >= 24
|
||||||
# Update the sphinx theme name
|
# 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
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_py3}
|
%if 0%{?with_py3}
|
||||||
# Prepare for a python3 build
|
# Prepare for a python3 build
|
||||||
cp -a %{srcname}-%{version} python3-%{srcname}-%{version}
|
cp -a python2 python3
|
||||||
sed -i 's/sphinx-build/&-3/' python3-%{srcname}-%{version}/docs/Makefile
|
sed -i 's/sphinx-build/&-3/' python3/docs/Makefile
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Python 2 build
|
# Python 2 build
|
||||||
pushd %{srcname}-%{version}
|
pushd python2
|
||||||
%py2_build
|
%py2_build
|
||||||
make -C docs html
|
make -C docs html
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if 0%{?with_py3}
|
%if 0%{?with_py3}
|
||||||
# Python 3 build
|
# Python 3 build
|
||||||
pushd python3-%{srcname}-%{version}
|
pushd python3
|
||||||
%py3_build
|
%py3_build
|
||||||
make -C docs html
|
make -C docs html
|
||||||
popd
|
popd
|
||||||
@ -109,39 +110,39 @@ popd
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
# Python 2 install
|
# Python 2 install
|
||||||
pushd %{srcname}-%{version}
|
pushd python2
|
||||||
%py2_install
|
%py2_install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if 0%{?with_py3}
|
%if 0%{?with_py3}
|
||||||
# Python 3 install
|
# Python 3 install
|
||||||
pushd python3-%{srcname}-%{version}
|
pushd python3
|
||||||
%py3_install
|
%py3_install
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Python 2 tests
|
# Python 2 tests
|
||||||
pushd %{srcname}-%{version}
|
pushd python2
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} test/runtests.py
|
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} test/runtests.py
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if 0%{?with_py3}
|
%if 0%{?with_py3}
|
||||||
# Python 3 tests
|
# Python 3 tests
|
||||||
pushd python3-%{srcname}-%{version}
|
pushd python3
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} test/runtests.py
|
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} test/runtests.py
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python2-%{srcname}
|
%files -n python2-%{srcname}
|
||||||
%license %{srcname}-%{version}/COPYING %{srcname}-%{version}/COPYING.LESSER
|
%license python2/COPYING python2/COPYING.LESSER
|
||||||
%doc %{srcname}-%{version}/docs/_build/html/*
|
%doc python2/docs/_build/html/*
|
||||||
%{python2_sitearch}/%{srcname}*
|
%{python2_sitearch}/%{srcname}*
|
||||||
|
|
||||||
%if 0%{?with_py3}
|
%if 0%{?with_py3}
|
||||||
%files -n python3-%{srcname}
|
%files -n python3-%{srcname}
|
||||||
%license %{srcname}-%{version}/COPYING %{srcname}-%{version}/COPYING.LESSER
|
%license python3/COPYING python3/COPYING.LESSER
|
||||||
%doc python3-%{srcname}-%{version}/docs/_build/html/*
|
%doc python3/docs/_build/html/*
|
||||||
%{python3_sitearch}/%{srcname}*
|
%{python3_sitearch}/%{srcname}*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user