Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: gm/rebaseline_server/fix_pythonpath.py

Issue 385783002: roll "common" DEPS, and replace tools/pyutils with it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rearrange DEPS a bit Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/download_actuals_test.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/fix_pythonpath.py
diff --git a/gm/rebaseline_server/fix_pythonpath.py b/gm/rebaseline_server/fix_pythonpath.py
index ed578ced1017a2047c4929b3267b4c1a052d2a74..cc32f4a6bcf3fa075ac3534a85e06c60ca4347ad 100755
--- a/gm/rebaseline_server/fix_pythonpath.py
+++ b/gm/rebaseline_server/fix_pythonpath.py
@@ -6,16 +6,15 @@ Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-Adds [trunk]/gm and [trunk]/tools to PYTHONPATH, if they aren't already there.
+Adds possibly-needed directories to PYTHONPATH, if they aren't already there.
"""
import os
import sys
-TRUNK_DIRECTORY = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
-GM_DIRECTORY = os.path.join(TRUNK_DIRECTORY, 'gm')
-TOOLS_DIRECTORY = os.path.join(TRUNK_DIRECTORY, 'tools')
-if GM_DIRECTORY not in sys.path:
- sys.path.append(GM_DIRECTORY)
-if TOOLS_DIRECTORY not in sys.path:
- sys.path.append(TOOLS_DIRECTORY)
+TRUNK_DIRECTORY = os.path.abspath(os.path.join(
+ os.path.dirname(__file__), os.pardir, os.pardir))
+for subdir in ['common', 'gm', 'tools']:
+ fullpath = os.path.join(TRUNK_DIRECTORY, subdir)
+ if fullpath not in sys.path:
+ sys.path.append(fullpath)
« no previous file with comments | « gm/rebaseline_server/download_actuals_test.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698