```console [user@host dir]$ python3 -c "import pooch; pooch.retrieve('https://raw.githubusercontent.com/scipy/dataset-ascent/main/ascent.dat', known_hash='03ce124c1afc880f87b55f6b061110e2e1e939679184f5614e38dacc6c1957e2')" ``` Actual result: ``` Downloading data from 'https://raw.githubusercontent.com/scipy/dataset-ascent/main/ascent.dat' to file '/usr/src/.cache/pooch/a054439914b0bb9423fcdf06445c6c08-ascent.dat'. Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3/site-packages/pooch/core.py", line 239, in retrieve stream_download(url, full_path, known_hash, downloader, pooch=None) File "/usr/lib/python3/site-packages/pooch/core.py", line 794, in stream_download import requests.exceptions # pylint: disable=C0415 ^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'requests' ``` Expected result: dowloaded data file
(Ответ для Stanislav Levin на комментарий #0) ... > File "/usr/lib/python3/site-packages/pooch/core.py", line 794, in > stream_download > import requests.exceptions # pylint: disable=C0415 ^^^^^^^^^^^^^^^^^^^^^^^ Это надо вешать на rpm-build-python3, который, видимо, не справляется с комментарием в конце строки.
Это не так, импорт вложенный, поэтому в slight: [user@host python3-module-pooch]$ RPM_PYTHON3_IMPORT_PATH=$(pwd) RPM_BUILD_ROOT=$(pwd) RPM_PYTHON3_REQ_METHOD=slight /usr/lib/rpm/python3.req pooch/pooch/downloaders.py 2>&1 | grep requests py3req:pooch/pooch/downloaders.py: "requests" lines:[[[195]], [632], [[[790]]], [[[955]]], [[1074]]]: Ignore for REQ:slight и в strict: [user@host python3-module-pooch]$ RPM_PYTHON3_IMPORT_PATH=$(pwd) RPM_BUILD_ROOT=$(pwd) RPM_PYTHON3_REQ_METHOD=strict /usr/lib/rpm/python3.req pooch/pooch/downloaders.py 2>&1 | grep requests python3(requests) Это же можно видеть и в логе сборке в сизиф: https://git.altlinux.org/tasks/archive/done/_333/341168/build/100/x86_64/log [00:00:05] py3req:/usr/src/tmp/python3-module-pooch-buildroot/usr/lib/python3/site-packages/pooch/core.py: "requests.exceptions" lines:[[794]]: Ignore for REQ:slight ... [00:00:05] py3req:/usr/src/tmp/python3-module-pooch-buildroot/usr/lib/python3/site-packages/pooch/downloaders.py: "requests" lines:[[[197]], [640], [[[798]]], [[[964]]], [[1084]]]: Ignore for REQ:slight
python3-module-pooch-1.8.1-alt1.1 -> sisyphus: Mon Apr 22 2024 Yuri N. Sedunov <aris@altlinux> 1.8.1-alt1.1 - rebuilt with python3_req_method=strict (ALT #50120) - split tests to separate subpackage