Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: reduce the use of sys.path.insert() in configure.py #25884

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'g++')

sys.path.insert(0, os.path.join('tools', 'gyp', 'pylib'))
from gyp.common import GetFlavor
# sys.path.insert(0, os.path.join('tools', 'gyp', 'pylib'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this? Rule of thumb: don't leave in commented-out code.

from node.tools.gyp.pylib.gyp.common import GetFlavor

# imports in tools/configure.d
sys.path.insert(0, os.path.join('tools', 'configure.d'))
import nodedownload

# imports in tools/
sys.path.insert(0, 'tools')
import getmoduleversion
from gyp_node import run_gyp
# sys.path.insert(0, 'tools')
from node.tools import getmoduleversion
from node.tools.gyp_node import run_gyp

# imports in deps/v8/tools/node
sys.path.insert(0, os.path.join('deps', 'v8', 'tools', 'node'))
from fetch_deps import FetchDeps
# sys.path.insert(0, os.path.join('deps', 'v8', 'tools', 'node'))
from node.deps.v8.tools.node.fetch_deps import FetchDeps

# parse our options
parser = optparse.OptionParser()
Expand Down