diff --git a/python-biopython.spec b/python-biopython.spec index 6943906..58dacac 100644 --- a/python-biopython.spec +++ b/python-biopython.spec @@ -22,16 +22,20 @@ %if 0%{?fedora} && 0%{?fedora} >= 30 %global with_python3 1 %global with_python2 0 -Obsoletes: python2-%{module} +Obsoletes: python2-biopython %endif +%if 0%{?python3_version_nodots} == 38 %global with_check 1 +%else +%global with_check 1 +%endif %global module biopython Name: python-biopython Version: 1.73 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python tools for computational molecular biology Source0: https://files.pythonhosted.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz @@ -65,9 +69,11 @@ BuildRequires: wise2 %if 0%{?rhel} BuildRequires: MySQL-%{py2_prefix} BuildRequires: numpy +BuildRequires: mysql-connector-%{py2_prefix} %else BuildRequires: %{py2_prefix}-numpy BuildRequires: %{py2_prefix}-mysql +BuildRequires: %{py2_prefix}-mysql-connector %endif # Required packages @@ -106,6 +112,7 @@ BuildRequires: python%{python3_pkgversion}-numpy BuildRequires: python%{python3_pkgversion}-mysql BuildRequires: python%{python3_pkgversion}-psycopg2 BuildRequires: python%{python3_pkgversion}-rdflib +BuildRequires: mysql-connector-python%{python3_pkgversion} Requires: python%{python3_pkgversion}-networkx Requires: python%{python3_pkgversion}-pygraphviz Requires: mysql-connector-python%{python3_pkgversion} @@ -134,6 +141,7 @@ BuildRequires: python%{python3_other_pkgversion}-numpy BuildRequires: python%{python3_other_pkgversion}-mysql BuildRequires: python%{python3_other_pkgversion}-psycopg2 BuildRequires: python%{python3_other_pkgversion}-rdflib +BuildRequires: mysql-connector-python%{python3_other_pkgversion} Requires: python%{python3_other_pkgversion}-networkx Requires: python%{python3_other_pkgversion}-pygraphviz Requires: mysql-connector-python%{python3_other_pkgversion} @@ -147,7 +155,8 @@ Requires: python%{python3_other_pkgversion}-rdflib %description -n python%{python3_other_pkgversion}-%{module} A set of freely available Python3 tools for computational molecular biology. -%endif # with_python3_other +%endif +# with_python3_other %package doc Summary: PDF and HTML documentation of %{module} @@ -176,11 +185,13 @@ cp -a %{module}-%{version} python2 %if 0%{?with_python3} cp -a %{module}-%{version} python3 -%endif # with_python3 +%endif +# with_python3 %if 0%{?with_python3_other} cp -a %{module}-%{version} python%{python3_other_pkgversion} -%endif # with_python3_other +%endif +# with_python3_other %build %if 0%{?with_python2} @@ -193,13 +204,15 @@ popd pushd python3 %py3_build popd -%endif # with_python3 +%endif +# with_python3 %if 0%{?with_python3_other} pushd python%{python3_other_pkgversion} %py3_other_build popd -%endif # with_python3_other +%endif +# with_python3_other %install %if 0%{?with_python3} @@ -227,8 +240,7 @@ popd %endif ##DocTest cannot be executed -##https://github.com/biopython/biopython/issues/669 -##http://lists.open-bio.org/pipermail/biopython-dev/2014-May/020541.html +##https://github.com/biopython/biopython/issues/669; http://lists.open-bio.org/pipermail/biopython-dev/2014-May/020541.html %if 0%{?with_check} %check %if 0%{?with_python2} @@ -241,12 +253,17 @@ done popd %endif -# See https://github.com/biopython/biopython/issues/855 -# https://github.com/biopython/biopython/issues/1889 +# See https://github.com/biopython/biopython/issues/855; https://github.com/biopython/biopython/issues/1889 %if 0%{?with_python3} pushd python3/Tests find . -name 'run_tests.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' +# See https://github.com/biopython/biopython/issues/2128; https://github.com/biopython/biopython/issues/2120 +# and https://bugs.python.org/issue24214 +%if 0%{?python3_version_nodots} == 38 +for test in `ls test_*.py | grep -v Nexus | grep -v Phylo | grep -v Tutorial | grep -v bgzf | grep -v SearchIO_blast | grep -v Affy | grep -v BioSQL | grep -v GenBank | grep -v Location | grep -v SubsMat`; do +%else for test in `ls test_*.py | grep -v Nexus | grep -v Phylo | grep -v Tutorial | grep -v bgzf | grep -v SearchIO_blast`; do +%endif echo $LANG export PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} %{__python3} run_tests.py --offline -v ${test} @@ -264,8 +281,10 @@ export PYTHONPATH=$RPM_BUILD_ROOT%{python3_other_sitearch} %{__python3_other} run_tests.py --offline -v ${test} done popd -%endif # with_python3_other -%endif # with_check +%endif +# with_python3_other +%endif +# with_check %if 0%{?with_python2} %files -n python2-%{module} @@ -302,6 +321,9 @@ popd %license %{module}-%{version}/LICENSE.rst %changelog +* Mon Jul 15 2019 Antonio Trande - 1.73-5 +- Disable failed tests on Python-3.8 + * Fri Jun 14 2019 Antonio Trande - 1.73-4 - Reorganize Requires packages for EPEL7