From f1435ce51f2fa2bfac9dcff55d94992e4b5e7e00 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 28 Dec 2014 14:50:25 +0100 Subject: Use a dirty hack to copy icon files into package. See #325. --- setup.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index fcbb19aae..f525b6775 100755 --- a/setup.py +++ b/setup.py @@ -24,16 +24,21 @@ import os import os.path import glob +import shutil from scripts import setupcommon as common import setuptools -try: - BASEDIR = os.path.dirname(os.path.realpath(__file__)) -except NameError: - BASEDIR = None +BASEDIR = os.path.dirname(os.path.realpath(__file__)) + + +icon_path = os.path.join('qutebrowser', 'icons') +shutil.rmtree(icon_path) +os.mkdir(icon_path) +for fn in glob.glob('icons/*.png'): + shutil.copy(fn, icon_path) try: @@ -50,7 +55,6 @@ try: **common.setupdata ) finally: - if BASEDIR is not None: - path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') - if os.path.exists(path): - os.remove(path) + path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') + if os.path.exists(path): + os.remove(path) -- cgit v1.2.3-54-g00ecf