#8 WIP: Update to 1.3; Drop python2 packages
Closed 4 years ago by churchyard. Opened 4 years ago by orion.
rpms/ orion/scipy 1.3  into  master

file modified
+1
@@ -26,3 +26,4 @@ 

  /scipy-1.1.0.tar.gz

  /scipy-1.2.0.tar.gz

  /scipy-1.2.1.tar.gz

+ /scipy-1.3.0.tar.gz

file modified
+13 -61
@@ -6,8 +6,8 @@ 

  

  Summary:    Scientific Tools for Python

  Name:       scipy

- Version:    1.2.1

- Release:    3%{?dist}

+ Version:    1.3.0

+ Release:    1%{?dist}

  

  # BSD -- whole package except:

  # Boost -- scipy/special/cephes/scipy_iv.c
@@ -21,10 +21,6 @@ 

  # https://stackoverflow.com/a/47731333/1839451

  Patch0:     acceptable_failure_rate.patch

  

- BuildRequires: python2-numpy, python2-devel,python2-numpy-f2py

- BuildRequires: python2-pytest

- BuildRequires: python2-pytest-xdist

- BuildRequires: python2-pytest-timeout

  BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel

  %ifarch %{openblas_arches}

  BuildRequires: openblas-devel
@@ -64,32 +60,7 @@ 

  leading scientists and engineers.

  

  

- %package -n python2-scipy

- Summary:    Scientific Tools for Python

- Requires:   numpy, f2py

- %{?python_provide:%python_provide python2-scipy}

- # General provides of plain 'scipy' in F24

- Provides:       scipy = %{version}-%{release}

- Provides:       scipy%{?_isa} = %{version}-%{release}

- Obsoletes:      scipy <= 0.16.0

- %description -n python2-scipy

- Scipy is open-source software for mathematics, science, and

- engineering. The core library is NumPy which provides convenient and

- fast N-dimensional array manipulation. The SciPy library is built to

- work with NumPy arrays, and provides many user-friendly and efficient

- numerical routines such as routines for numerical integration and

- optimization. Together, they run on all popular operating systems, are

- quick to install, and are free of charge. NumPy and SciPy are easy to

- use, but powerful enough to be depended upon by some of the world's

- leading scientists and engineers.

- 

  %if %{with doc}

- %package -n python2-scipy-doc

- Summary:    Scientific Tools for Python - documentation

- Requires:   python2-scipy = %{version}-%{release}

- %description -n python2-scipy-doc

- HTML documentation for Scipy

- 

  %package -n python3-scipy-doc

  Summary:    Scientific Tools for Python - documentation

  Requires:   python3-scipy = %{version}-%{release}
@@ -140,7 +111,7 @@ 

  

  

  %build

- for PY in %{python3_version} %{python2_version}; do

+ for PY in %{python3_version}; do

    env CFLAGS="$RPM_OPT_FLAGS -lm" \

        FFLAGS="$RPM_OPT_FLAGS -fPIC" \

    %ifarch %{openblas_arches}
@@ -154,24 +125,18 @@ 

      build

  

    %if %{with doc}

-   # No python2-sphinx on Fedora 31+

-   if [ $PY == %{python3_version} -o 0%{?fedora} -lt 31 ]

-   then

-     pushd doc

-     export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/)

-     make html SPHINXBUILD=sphinx-build-$PY

-     rm -rf build/html/.buildinfo

-     mv build build-$PY

-     popd

-   fi

+   pushd doc

+   export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/)

+   make html SPHINXBUILD=sphinx-build-$PY

+   rm -rf build/html/.buildinfo

+   mv build build-$PY

+   popd

    %endif

  done

  

  %install

  %py3_install

- %py2_install

  # Some files got ambiguous python shebangs, we fix them after everything else is done

- pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}%{python2_sitearch}

  pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}

  

  %check
@@ -207,23 +172,6 @@ 

  rm -rf gram{A,B}

  popd

  

- pushd %{buildroot}/%{python2_sitearch}

- py.test-2 --timeout=300 -k "$k" scipy

- # Remove test remnants

- rm -f gram{A,B}

- popd

- 

- 

- %files -n python2-scipy

- %doc LICENSE.txt

- %{python2_sitearch}/scipy/

- %{python2_sitearch}/*.egg-info

- 

- %if %{with doc} && 0%{?fedora} < 31

- %files -n python2-scipy-doc

- %license LICENSE.txt

- %doc doc/build-%{python2_version}/html

- %endif # with doc

  

  %files -n python3-scipy

  %doc LICENSE.txt
@@ -237,6 +185,10 @@ 

  %endif # with doc

  

  %changelog

+ * Mon May 20 2019 Orion Poplawski <orion@nwra.com> - 1.3.0-1

+ - Update to 1.3.0

+ - Drop python2 packages

+ 

  * Thu May 16 2019 Orion Poplawski <orion@nwra.com> - 1.2.1-3

  - Build only against openblasp (bugz#1709161)

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (scipy-1.2.1.tar.gz) = 80caf9af93046c0d58829a61eb90d824aabe8a53f3e7d8a72efc44accaa3299d1e22adbb4852ed192cee6e47aafbb4ebea3115233ed11f1ef05dd373866b0243

+ SHA512 (scipy-1.3.0.tar.gz) = 11dfe6027061efb176811d1d2c8b60ee53157f6fff59baa312b3b6a84461123e12f044d5d138d04b1162612d35c6cc34837208d56cdf79c294862ef90c62ea1d

Currently does not build, dependencies need to dealt with first as well. See also https://bugzilla.redhat.com/show_bug.cgi?id=1674101

FTR, x86_64:

scipy/spatial/tests/test_kdtree.py ..................................... [ 78%]
BUILDSTDERR: ............................/var/tmp/rpm-tmp.LEusgP: line 45: 18231 Aborted                 (core dumped) py.test-3 --timeout=300 -k "$k" scipy

I reproduced this issue on Fedora Rawhide using:

sudo dnf install -y openblas-devel gcc-gfortran patch
sudo dnf debuginfo-install python38

# remove deprecation warning
sudo vim /usr/lib64/python3.8/inspect.py +1114

python3.8 -m venv env
python -m pip install pytest

./env/bin/pip install -U  https://github.com/cython/cython/archive/0.29.8.zip
wget https://files.pythonhosted.org/packages/93/48/956b9dcdddfcedb1705839280e02cbfeb2861ed5d7f59241210530867d5b/numpy-1.16.3.zip
unzip -d . numpy-1.16.3.zip 
cd numpy-1.16.3
rm -f -v $(grep -rl '/\* Generated by Cython')  PKG-INFO
python setup.py install

cd

wget 'https://files.pythonhosted.org/packages/cb/97/361c8c6ceb3eb765371a702ea873ff2fe112fa40073e7d2b8199db8eb56e/scipy-1.3.0.tar.gz'
tar -xf scipy-1.3.0.tar.gz 
cd scipy-1.3.0

wget https://src.fedoraproject.org/rpms/scipy/raw/master/f/acceptable_failure_rate.patch
patch -p1 < acceptable_failure_rate.patch 

# Run the whole test suite
# python runtests.py  -v

# Only run the test which crash
# python runtests.py --tests 'scipy/spatial/tests/test_kdtree.py::Test_random_ball_compiled::test_in_ball'

gdb -args python runtests.py --tests 'scipy/spatial/tests/test_kdtree.py::Test_random_ball_compiled::test_in_ball'

gdb traceback:

scipy/spatial/tests/test_kdtree.py 
Program received signal SIGABRT, Aborted.
0x00007ffff7e383f5 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-29.fc30.x86_64 expat-2.2.6-2.fc30.x86_64 libffi-3.1-20.fc31.x86_64 libgcc-9.1.1-1.fc31.x86_64 libgfortran-9.1.1-1.fc31.x86_64 libquadmath-9.1.1-1.fc31.x86_64 libstdc++-9.1.1-1.fc31.x86_64 libuuid-2.34-0.1.fc31.x86_64 openblas-serial-0.3.6-1.fc31.x86_64 openssl-libs-1.1.1b-10.fc31.x86_64 xz-libs-5.2.4-5.fc30.x86_64 zlib-1.2.11-15.fc30.x86_64
(gdb) where
#0  0x00007ffff7e383f5 in raise () from /lib64/libc.so.6
#1  0x00007ffff7e228d9 in abort () from /lib64/libc.so.6
#2  0x00007ffff51cf338 in std::__replacement_assert (__file=__file@entry=0x7ffff52172a8 "/usr/include/c++/9/bits/stl_vector.h", __line=__line@entry=1120, 
    __function=__function@entry=0x7ffff52175f0 "std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::front() [with _Tp = long int; _Alloc = std::allocator<long int>; std::vector<_Tp, _Alloc>::reference = long int&]", __condition=__condition@entry=0x7ffff52171c8 "__builtin_expect(!this->empty(), true)")
    at /usr/include/c++/9/x86_64-redhat-linux/bits/c++config.h:2533
#3  0x00007ffff51ce7e7 in std::vector<long, std::allocator<long> >::front (this=<optimized out>) at scipy/spatial/ckdtree.cxx:10696
#4  __pyx_pf_5scipy_7spatial_7ckdtree_7cKDTree_16query_ball_point__thread_func (__pyx_v_stop=<optimized out>, __pyx_v_start=<optimized out>, __pyx_self=<optimized out>) at scipy/spatial/ckdtree.cxx:10709
#5  __pyx_pw_5scipy_7spatial_7ckdtree_7cKDTree_16query_ball_point_1_thread_func (__pyx_self=<optimized out>, __pyx_args=<optimized out>, __pyx_kwds=<optimized out>) at scipy/spatial/ckdtree.cxx:10351
#6  0x00007ffff519f281 in __Pyx_PyObject_Call (kw=0x0, arg=<optimized out>, func=<cython_function_or_method at remote 0x7ffff5b01040>) at scipy/spatial/ckdtree.cxx:35485
#7  __pyx_pf_5scipy_7spatial_7ckdtree__run_threads (__pyx_self=<optimized out>, __pyx_v_n_jobs=<optimized out>, __pyx_v_n=<optimized out>, __pyx_v__thread_func=<optimized out>) at scipy/spatial/ckdtree.cxx:16478
#8  __pyx_pw_5scipy_7spatial_7ckdtree_1_run_threads (__pyx_self=<optimized out>, __pyx_args=<optimized out>, __pyx_kwds=<optimized out>) at scipy/spatial/ckdtree.cxx:16001
#9  0x00007ffff7bb804f in cfunction_call_varargs (kwargs=<optimized out>, args=<optimized out>, func=<built-in function _run_threads>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:755
#10 PyCFunction_Call (func=<built-in function _run_threads>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:786
#11 0x00007ffff51800b6 in __Pyx_PyObject_Call (func=<built-in function _run_threads>, arg=(<cython_function_or_method at remote 0x7ffff5b01040>, 1, 1), kw=0x0) at scipy/spatial/ckdtree.cxx:35485
#12 0x00007ffff51bf115 in __pyx_pf_5scipy_7spatial_7ckdtree_7cKDTree_8query_ball_point (__pyx_v_self=__pyx_v_self@entry=0x7ffff5c33318, __pyx_v_x=__pyx_v_x@entry=<numpy.ndarray at remote 0x7ffff2221850>, __pyx_v_r=<numpy.ndarray at remote 0x7ffff21f0ad0>, __pyx_v_r@entry=<float at remote 0x7ffff25362d0>, 
    __pyx_v_p=<optimized out>, __pyx_v_eps=<optimized out>, __pyx_v_n_jobs=1, __pyx_v_return_sorted=<optimized out>, __pyx_v_return_length=<optimized out>) at scipy/spatial/ckdtree.cxx:11750
#13 0x00007ffff51c2a8e in __pyx_pw_5scipy_7spatial_7ckdtree_7cKDTree_9query_ball_point (__pyx_v_self=__pyx_v_self@entry=<scipy.spatial.ckdtree.cKDTree at remote 0x7ffff5c33318>, __pyx_args=__pyx_args@entry=(<numpy.ndarray at remote 0x7ffff2221850>, <float at remote 0x7ffff25362d0>), 
    __pyx_kwds=__pyx_kwds@entry={'p': <float at remote 0x7ffff2536348>, 'eps': 0}) at scipy/spatial/ckdtree.cxx:10273
#14 0x00007ffff7be4a84 in _PyMethodDef_RawFastCallKeywords (method=<optimized out>, self=<scipy.spatial.ckdtree.cKDTree at remote 0x7ffff5c33318>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:692
#15 0x00007ffff7be4ae3 in _PyCFunction_FastCallKeywords (func=<built-in method query_ball_point of scipy.spatial.ckdtree.cKDTree object at remote 0x7ffff5c33318>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:732
#16 0x00007ffff7bef23c in call_function (pp_stack=0x7fffffff7818, oparg=<optimized out>, kwnames=('p', 'eps')) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Python/ceval.c:4763
#17 0x00007ffff7c1bf7d in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Python/ceval.c:3317
#18 0x00007ffff7ba7e7a in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:285
#19 _PyFunction_FastCallDict (func=<optimized out>, args=0x7fffffff7980, nargs=1, kwargs={}) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:324
#20 0x00007ffff7bb69f6 in _PyObject_Call_Prepend (callable=<function at remote 0x7ffff2253740>, obj=<optimized out>, args=(), kwargs={}) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:906
#21 0x00007ffff7bb279e in PyObject_Call (callable=<method at remote 0x7ffff5c0c8c8>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Objects/call.c:247
#22 0x00007ffff7c1aaca in do_call_core (kwdict={}, callargs=(), func=<method at remote 0x7ffff5c0c8c8>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Python/ceval.c:4865
#23 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python38-3.8.0~a4-2.fc31.x86_64/Python/ceval.c:3361
#24 0x00007ffff7ba7141 in _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x0, kwcount=<optimized out>, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='pytest_pyfunc_call', 

Python traceback:

(gdb) py-bt
Traceback (most recent call first):
  <built-in method query_ball_point of scipy.spatial.ckdtree.cKDTree object at remote 0x7ffff5c33318>
  File "/home/vstinner/scipy-1.3.0/build/testenv/lib64/python3.8/site-packages/scipy/spatial/tests/test_kdtree.py", line 283, in test_in_ball
    l = self.T.query_ball_point(x, self.d, p=self.p, eps=self.eps)
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/python.py", line 179, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/callers.py", line 443, in _multicall
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 334, in <lambda>
    def after(outcome, hook_name, methods, kwargs):
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/hooks.py", line 1057, in __call__
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/python.py", line 1467, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 122, in pytest_runtest_call
    item.runtest()
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/callers.py", line 443, in _multicall
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 334, in <lambda>
    def after(outcome, hook_name, methods, kwargs):
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/hooks.py", line 1057, in __call__
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 197, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 225, in from_call
    result = func()
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 452, in call_runtest_hook
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 172, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 92, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/runner.py", line 77, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/callers.py", line 443, in _multicall
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 334, in <lambda>
    def after(outcome, hook_name, methods, kwargs):
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/hooks.py", line 1057, in __call__
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/main.py", line 270, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/callers.py", line 443, in _multicall
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 334, in <lambda>
    def after(outcome, hook_name, methods, kwargs):
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/hooks.py", line 1057, in __call__
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/main.py", line 249, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/main.py", line 205, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/main.py", line 242, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/callers.py", line 443, in _multicall
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 334, in <lambda>
    def after(outcome, hook_name, methods, kwargs):
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/vstinner/env/lib64/python3.8/site-packages/pluggy/hooks.py", line 1057, in __call__
  File "/home/vstinner/env/lib64/python3.8/site-packages/_pytest/config/__init__.py", line 847, in main
    self.pluginmanager.consider_env()
  File "/home/vstinner/scipy-1.3.0/build/testenv/lib64/python3.8/site-packages/scipy/_lib/_testutils.py", line 61, in __call__
    code = pytest.main(pytest_args)
  File "runtests.py", line 8474, in main
  File "runtests.py", line 732, in <module>

Pull-Request has been closed by churchyard

4 years ago