From 1f42cf74ad46935b62c44778ea09debfdfed89a7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 May 2014 23:17:22 +0200 Subject: [PATCH] Make scripts work when not started from scripts folder --- scripts/freeze.py | 2 ++ scripts/run_profile.py | 2 ++ scripts/setupdata.py | 3 +++ 3 files changed, 7 insertions(+) diff --git a/scripts/freeze.py b/scripts/freeze.py index 0b2d72f23..ef1889655 100644 --- a/scripts/freeze.py +++ b/scripts/freeze.py @@ -22,11 +22,13 @@ Builds a standalone executable. """ +import os import sys import platform from cx_Freeze import setup, Executable +sys.path.insert(0, os.getcwd()) from scripts.setupdata import setupdata diff --git a/scripts/run_profile.py b/scripts/run_profile.py index 194e0b571..988a8a1a6 100755 --- a/scripts/run_profile.py +++ b/scripts/run_profile.py @@ -8,6 +8,8 @@ from tempfile import mkdtemp from subprocess import call from shutil import rmtree +sys.path.insert(0, getcwd()) + from qutebrowser.app import QuteBrowser tempdir = mkdtemp() diff --git a/scripts/setupdata.py b/scripts/setupdata.py index 20e0b1dc9..6b458af6e 100644 --- a/scripts/setupdata.py +++ b/scripts/setupdata.py @@ -18,6 +18,9 @@ """Data used by setup.py and scripts/freeze.py""" +import sys +import os +sys.path.insert(0, os.getcwd()) import qutebrowser