Skip to content

Commit

Permalink
Change how we look for build module
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandInguva committed Oct 13, 2023
1 parent 250483c commit 76200ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/runners/portability/stager.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

import glob
import hashlib
import importlib.util
import logging
import os
import pkgutil
import shutil
import sys
import tempfile
Expand Down Expand Up @@ -774,7 +774,7 @@ def _build_setup_package(setup_file, # type: str
if build_setup_args is None:
# if build is installed in the user env, use it to
# build the sdist else fallback to legacy setup.py sdist call.
if importlib.util.find_spec('build'):
if pkgutil.find_loader('build') is not None:
build_setup_args = [
Stager._get_python_executable(),
'-m',
Expand Down

0 comments on commit 76200ae

Please sign in to comment.