Skip to content

Commit

Permalink
Also the deps.py script can use the embedded python version
Browse files Browse the repository at this point in the history
  • Loading branch information
guruDanny67 committed Dec 7, 2019
1 parent e447431 commit 58b3379
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deps.py
Expand Up @@ -17,6 +17,19 @@
"""
gvsbuild deps print / .gv graph
"""
# Verify we can import from the script directory
try:
import gvsbuild.utils.utils
except ImportError:
# We are probably using an embedded installation
print('Error importing utility (running the embedded interpreter ?), fixing paths ...')
import sys
import os
# Get the script dir
script_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
# and add it at the beginning, emulating the standard python startup
sys.path.insert(0, script_dir)

import argparse

from gvsbuild.utils.base_project import Project, GVSBUILD_GROUP, GVSBUILD_TOOL, GVSBUILD_PROJECT
Expand Down

0 comments on commit 58b3379

Please sign in to comment.