Mach commands are broken with python-setuptools 60.0 and newer ("AttributeError: module 'packaging' has no attribute 'requirements'")
Categories
(Firefox Build System :: Mach Core, defect)
Tracking
(Not tracked)
People
(Reporter: fredbezies, Unassigned)
References
Details
Attachments
(1 file)
2.74 KB,
text/plain
|
Details |
Hello.
Yesterday, Archlinux upgraded python-setuptools to version 60.0. When I tried to build a freshly updated copy of Mozilla Firefox Nightly, mach stop right after it is stared.
There is a big error log in Python provided in an attachment of this bug report. The only fix for now is to downgrade to python-setuptools 58.9.0.
Of course, every single mach command is broken.
Comment 1•2 years ago
|
||
Are you setting MACH_USE_SYSTEM_PYTHON or MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE?
Reporter | ||
Comment 2•2 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #1)
Are you setting MACH_USE_SYSTEM_PYTHON or MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE?
None of them. I did not modify anything related to mach. I just run ./mach build and the error log appeared.
Comment 4•2 years ago
|
||
I just tried this which seems to have helped; at least the build is running:
diff --git c/build/mach_initialize.py i/build/mach_initialize.py
index 696bc05eee7dc..fec325f876f3f 100644
--- c/build/mach_initialize.py
+++ i/build/mach_initialize.py
@@ -135,13 +135,17 @@ def initialize(topsrcdir):
# We need the "mach" module to access the logic to parse virtualenv
# requirements. Since that depends on "packaging" (and, transitively,
- # "pyparsing"), we add those to the path too.
+ # "pyparsing", "setuptools", "ordered_set" and "appdirs"), we add those to
+ # the path too.
sys.path[0:0] = [
os.path.join(topsrcdir, module)
for module in (
os.path.join("python", "mach"),
os.path.join("third_party", "python", "packaging"),
os.path.join("third_party", "python", "pyparsing"),
+ os.path.join("third_party", "python", "setuptools"),
+ os.path.join("third_party", "python", "ordered_set"),
+ os.path.join("third_party", "python", "appdirs"),
)
]
Comment 5•2 years ago
|
||
adding the error message to the bug summary and to this comment, for searchability:
AttributeError: module 'packaging' has no attribute 'requirements'
Comment 6•2 years ago
|
||
It seems this resolved itself with further updates. I didn't need the patch with at least setuptools 60.3.1 and 60.4.0.
Reporter | ||
Comment 7•2 years ago
|
||
(In reply to Jan Alexander Steffens [:heftig] from comment #6)
It seems this resolved itself with further updates. I didn't need the patch with at least setuptools 60.3.1 and 60.4.0.
Same here. Looks like this bug is fixed now.
Updated•2 years ago
|
Description
•