Fix overlinking (with libpthread) and underlinking (missing libm).

Drop unnecessary cython BR.
This commit is contained in:
Jerry James 2019-12-11 13:38:15 -07:00
parent b5231079bc
commit 8a46559ff1
2 changed files with 22 additions and 7 deletions

8
python-gmpy2.rpmlintrc Normal file
View File

@ -0,0 +1,8 @@
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# The dictionary is missing some technical terms
addFilter(r'W: spelling-error .* gmpy')
# This package really is a devel package
addFilter(r'W: devel-file-in-non-devel-package')

View File

@ -3,7 +3,7 @@
Name: python-%{srcname}
Version: 2.1.0
Release: 0.12%{?prerelease:.%{prerelease}}%{?dist}
Release: 0.13%{?prerelease:.%{prerelease}}%{?dist}
Summary: Python interface to GMP, MPFR, and MPC
License: LGPLv3+
@ -13,9 +13,8 @@ Source0: https://github.com/aleaxit/gmpy/archive/%{srcname}-%{version}%{?
BuildRequires: gcc
BuildRequires: gmp-devel
BuildRequires: libmpc-devel
BuildRequires: mpfr-devel
BuildRequires: pkgconfig(mpfr)
BuildRequires: python3-devel
BuildRequires: python3dist(cython)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(sphinx)
@ -38,16 +37,13 @@ Summary: Python 3 interface to GMP, MPFR, and MPC
Provides: bundled(jquery)
%{?python_provide:%python_provide python3-%{srcname}}
# This can be removed when F29 reaches EOL
Obsoletes: python2-%{srcname} < 2.1.0-0.6.a4
Provides: python2-%{srcname} = %{version}-%{release}
%description -n python3-%{srcname}
%{common_desc}
%prep
%autosetup -p0 -n %{srcname}-%{version}%{?prerelease}
# See https://github.com/aleaxit/gmpy/pull/254 for the encoding changes.
# Fix file encodings. First the easy one.
iconv -f ISO8859-1 -t UTF-8 src/gmpy2.c > src/gmpy2.c.utf8
touch -r src/gmpy2.c src/gmpy2.c.utf8
@ -64,7 +60,14 @@ sed -i "s/'default'/'classic'/" docs/conf.py
# Version 2.1.0b3 still calls itself 2.1.0b1
sed -i "s/b1/b3/" docs/conf.py
# Symbols from the math library are also used
sed -i "s/'mpfr','gmp'/&,'m'/" setup.py
%build
# Do not pass -pthread to the compiler or linker
export CC=gcc
export LDSHARED="gcc -shared"
%py3_build
make -C docs html
@ -80,6 +83,10 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} test/runtests.py
%{python3_sitearch}/%{srcname}*
%changelog
* Wed Dec 11 2019 Jerry James <loganjerry@gmail.com> - 2.1.0-0.13.b3
- Fix overlinking (with libpthread) and underlinking (missing libm)
- Drop unnecessary cython BR
* Wed Oct 9 2019 Jerry James <loganjerry@gmail.com> - 2.1.0-0.12.b3
- Rebuild for mpfr 4