Skip to content

Commit

Permalink
Merge branch 'pr-2263'
Browse files Browse the repository at this point in the history
fix(build): update mojo files for python 3.12 (pr-2263):
 - 6a02b9a fix(build): update mojo files for python 3.12
  • Loading branch information
thorium-cfx committed Nov 3, 2023
2 parents 4dc24a9 + 6a02b9a commit 63db008
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys

Expand All @@ -17,7 +17,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("ply")
importlib.util.find_spec("ply")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("mojo"), "third_party"))
from ply.lex import TOKEN
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import shutil
import sys
Expand All @@ -20,7 +20,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom import fileutil
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -18,7 +18,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom.generate import data
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -18,7 +18,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom.generate import generator
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -18,7 +18,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom.generate import module as mojom
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -20,7 +20,7 @@ def _GetDirAbove(dirname):


try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom.generate import pack
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -18,7 +18,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
import mojom.parse.ast as ast
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os
import sys
import unittest
Expand All @@ -20,7 +20,7 @@ def _GetDirAbove(dirname):


try:
imp.find_module('mojom')
importlib.util.find_spec('mojom')
except ImportError:
sys.path.append(os.path.join(_GetDirAbove('pylib'), 'pylib'))
import mojom.parse.ast as ast
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -21,7 +21,7 @@ def _GetDirAbove(dirname):
from ply import lex

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
import mojom.parse.lexer
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -18,7 +18,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
import mojom.parse.ast as ast
Expand Down
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import imp
import importlib
import os.path
import sys
import unittest
Expand All @@ -18,7 +18,7 @@ def _GetDirAbove(dirname):
return path

try:
imp.find_module("mojom")
importlib.util.find_spec("mojom")
except ImportError:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom.parse import ast
Expand Down

0 comments on commit 63db008

Please sign in to comment.