New comment by kartikynwa on void-packages repository
https://github.com/void-linux/void-packages/pull/40928#issuecomment-1341038818
Comment:
@ahesford backblaze-b2 fails without tqdm. I am not sure why this is:
Output
```
in void-packages on update-b2 [✘!?] took 3s
❯ xbps-query -l | grep '\(backblaze-b2\|tqdm\)'
ii backblaze-b2-3.6.0_1 Command Line Interface for Backblaze's B2 storage service
in void-packages on update-b2 [✘!?]
❯ b2 help
Traceback (most recent call last):
File "/usr/local/bin/b2", line 33, in
sys.exit(load_entry_point('b2==3.6.0', 'console_scripts', 'b2')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/b2", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 198, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/lib/python3.11/site-packages/b2/console_tool.py", line 34, in
from b2sdk.v2 import (
File "/usr/lib/python3.11/site-packages/b2sdk/v2/__init__.py", line 11, in
from b2sdk._v3 import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/b2sdk/_v3/__init__.py", line 48, in
from b2sdk.version_utils import rename_argument, rename_function
File "/usr/lib/python3.11/site-packages/b2sdk/version_utils.py", line 16, in
from pkg_resources import parse_version
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3259, in
@_call_aside
^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
working_set = WorkingSet._build_master()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 581, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'tqdm<5.0.0,>=4.5.0' distribution was not found and is required by b2sdk
```
On the other hand it works if tqdm is present
Output
```
in void-packages on update-b2 [✘!?] took 420ms
❯ xbps-query -l | grep '\(backblaze-b2\|tqdm\)'
ii backblaze-b2-3.6.0_1 Command Line Interface for Backblaze's B2 storage service
ii python3-tqdm-4.64.1_1 Fast, extensible progress bar for Python and CLI (Python3)
in void-packages on update-b2 [✘!?]
❯ b2 help
b2 [-h]
{authorize-account,authorize_account,cancel-all-unfinished-large-files,cancel_all_unfinished_large_files,cancel-large-file,cancel_large_file,clear-account,clear_account,copy-file-by-id,copy_file_by_id,create-bucket,create_bucket,create-key,create_key,delete-bucket,delete_bucket,delete-file-version,delete_file_version,delete-key,delete_key,download-file-by-id,download_file_by_id,download-file-by-name,download_file_by_name,get-account-info,get_account_info,get-bucket,get_bucket,get-file-info,get_file_info,get-download-auth,get_download_auth,get-download-url-with-auth,get_download_url_with_auth,hide-file,hide_file,list-buckets,list_buckets,list-keys,list_keys,list-parts,list_parts,list-unfinished-large-files,list_unfinished_large_files,ls,make-url,make_url,make-friendly-url,make_friendly_url,sync,update-bucket,update_bucket,upload-file,upload_file,update-file-legal-hold,update_file_legal_hold,update-file-retention,update_file_retention,replication-setup,replication_setup,replication-delete,replication_delete,replication-pause,replication_pause,replication-unpause,replication_unpause,replication-status,replication_status,version}
...
```
I am guessing this happens because in b2sdk's requirement.txt tqdm is listed as a dependency. But in the code I can see that the import is optional.