Closed Bug 1536179 Opened 5 years ago Closed 4 years ago

generate-wrappers-and-manifest.py fails to run on macOS

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: egao, Assigned: egao)

Details

(Whiteboard: gfx-noted)

Attachments

(1 file)

The script located at dom/canvas/test/webgl-conf/generate-wrappers-and-manifest.py fails when run on macOS with the following:

(python35_development) egao-44538:webgl-conf egao$ python3 generate-wrappers-and-manifest.py
Traceback (most recent call last):
  File "generate-wrappers-and-manifest.py", line 542, in <module>
    os.chdir(file_dir)
TypeError: argument should be string, bytes or integer, not PosixPath

This is the case with both Python 2.7.15 and Python 3.5.0.

OS: macOS 10.13.6 (17G5019)
Bash: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)

Required library pathlib is installed, is version 1.0.1.

I suspect this line behaves differently from Linux systems (including WSL) and macOS:

file_dir = Path(__file__).parent

Summary: generate-wrappers-and-manifest.py fails on macOS → generate-wrappers-and-manifest.py fails to run on macOS

Should be os.chdir(str(file_dir)), though tbh we should just not chdir at all.

Severity: normal → trivial
Priority: -- → P3
Whiteboard: gfx-noted

For anyone that decides to work on this - Python 3.7.0 handles the script fine as-is. Python 3.5.0 does not.

Maybe the 'fix' is to use a newer version of Python in general.

Assignee: nobody → egao
Status: NEW → ASSIGNED

This issue occurred way too often (especially during migration work where regeneration of manifest is often required), just deal with it.

Pushed by egao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8eb59d55fd8f
cast the PosixPath to a string r=jgilbert
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: