Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 920939

Summary: dev-python/pathable-0.4.3 fails to build: ModuleNotFoundError: No module named 'packaging'
Product: Gentoo Linux Reporter: matoro <matoro_gentoo>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED INVALID    
Severity: normal CC: matoro_gentoo, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 904721    
Attachments: build.log and emerge --info

Description matoro archtester 2023-12-29 16:24:23 UTC
Extremely weird traceback here, despite having packaging installed.

 * python3_10: running distutils-r1_run_phase distutils-r1_python_compile
 *   Building the wheel for pathable-0.4.3 via poetry.core.masonry.api
python3.10 -m gpep517 build-wheel --prefix=/usr --backend poetry.core.masonry.api --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/pathable-0.4.3/work/pathable-0.4.3-python3_10/wheel
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.10/site-packages/gpep517/__main__.py", line 429, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/gpep517/__main__.py", line 425, in main
    return func(args)
  File "/usr/lib/python3.10/site-packages/gpep517/__main__.py", line 215, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
  File "/usr/lib/python3.10/site-packages/gpep517/__main__.py", line 198, in build_wheel_impl
    backend = importlib.import_module(package)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/poetry/core/masonry/api.py", line 12, in <module>
    from poetry.core.factory import Factory
  File "/usr/lib/python3.10/site-packages/poetry/core/factory.py", line 13, in <module>
    from packaging.utils import canonicalize_name
ModuleNotFoundError: No module named 'packaging'


# qlist -Iv dev-python/packaging
dev-python/packaging-23.2

# ls /usr/lib/python3.10/site-packages/packaging/utils.py 
/usr/lib/python3.10/site-packages/packaging/utils.py

Reproducible: Always
Comment 1 matoro archtester 2023-12-29 16:25:14 UTC
Created attachment 880964 [details]
build.log and emerge --info
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-12-29 16:41:01 UTC
Could you check if you have any PYTHONPATH set in global scope?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-12-30 16:22:15 UTC
Per IRC discussion, this is not a problem with the package but either with Portage or with the scripts used by arch tester.