Closed Bug 1758682 Opened 3 years ago Closed 3 years ago

vendored setuptools should be updated after bug #1717051 ?

Categories

(Firefox Build System :: Mach Core, defect)

defect

Tracking

(firefox-esr91 unaffected, firefox98 wontfix, firefox99 wontfix, firefox100 wontfix)

RESOLVED WORKSFORME
Tracking Status
firefox-esr91 --- unaffected
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix

People

(Reporter: gaston, Unassigned)

Details

(Keywords: regression)

something strange happened when running configure on 98.0:

===>  Configuring for firefox-98.0                                                                                     
Using Python 3.9.10 from /usr/local/bin/python3.9                                                                      
Traceback (most recent call last):                                                                                     
  File "/usr/obj/ports/firefox-98.0/firefox-98.0/configure.py", line 349, in <module>                                  
    sys.exit(main(sys.argv))                                                                                           
  File "/usr/obj/ports/firefox-98.0/firefox-98.0/configure.py", line 120, in main                                      
    _activate_build_virtualenv()                                                                                       
  File "/usr/obj/ports/firefox-98.0/firefox-98.0/configure.py", line 336, in _activate_build_virtualenv                
    mach_site.activate()                                                                                               
  File "/usr/obj/ports/firefox-98.0/firefox-98.0/python/mach/mach/site.py", line 368, in activate                      
    exec(open(activate_path).read(), dict(__file__=activate_path))                                                     
  File "/usr/local/lib/python3.9/contextlib.py", line 126, in __exit__                                                 
    next(self.gen)                                                                                                     
  File "/usr/obj/ports/firefox-98.0/firefox-98.0/python/mach/mach/site.py", line 183, in update_current_site           
    pkg_resources._initialize_master_working_set()                                                                     
AttributeError: module 'pkg_resources' has no attribute '_initialize_master_working_set' 

that code was added in https://phabricator.services.mozilla.com/D120404

the system probably didnt have systemwide setuptools installed, and the vendored version added in bug #1732946 doesnt have this method.

wait, in a tarball of 99.0b1 the vendored setuptools does have the method.. so how come mach exploded..

Are you running Mach with MOZ_AUTOMATION=1 or MACH_USE_SYSTEM_PYTHON=1?
If so, what is your setuptools version and location (pip3 list -v)?

Flags: needinfo?(landry)

We're not setting any particular env variables, that's within our OpenBSD packaging infrastructure that just does the usual ./configure.

I've been reported the original issue pasted above, but i can't reproduce locally with 98.0 and after removing systemwide py3-setuptools 57.4.0.

If installed, setuptools 57.4.0 is in the systemwide python path (eg /usr/local/lib/python3.9/site-packages/setuptools)

Flags: needinfo?(landry)

If installed, setuptools 57.4.0 is in the systemwide python path (eg /usr/local/lib/python3.9/site-packages/setuptools)

Hmm, but the downstream user who encountered the issue may have a different version installed, such as to their [pip install] --user directory.

Looking at pkg_resources itself, it looks like _initialize_master_working_set() hasn't been removed:

We're not setting any particular env variables, that's within our OpenBSD packaging infrastructure that just does the usual ./configure.

To confirm: your OpenBSD packaging infra doesn't set those variables either?


I think I need more information to be able to diagnose and resolve this, I can't yet imagine a case where pkg_resources can be imported, but doesn't have the _initialize_master_working_set() function.

Set release status flags based on info from the regressing bug 1717051

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #4)

We're not setting any particular env variables, that's within our OpenBSD packaging infrastructure that just does the usual ./configure.

To confirm: your OpenBSD packaging infra doesn't set those variables either?

in the env the only python-related var set by the infra are PYTHONUSERBASE=/usr/obj/ports/firefox-98.0 and PYTHON="/usr/local/bin/python3.9". the other env vars are here https://github.com/openbsd/ports/blob/master/www/mozilla/mozilla.port.mk#L146 and here https://github.com/openbsd/ports/blob/master/www/mozilla-firefox/Makefile#L47


I think I need more information to be able to diagnose and resolve this, I can't yet imagine a case where pkg_resources can be imported, but doesn't have the _initialize_master_working_set() function.

Yeah, i dont understand either how that can happen.

Yeah, i dont understand either how that can happen.

Ok, I'm going to mark as WORKSFORME for now.
Feel free to send the downstream user to this ticket so that we can get more information about the failure and reopen this bug.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Has Regression Range: --- → yes
No longer regressed by: 1717051
You need to log in before you can comment on or make changes to this bug.