1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

setup.py: fix for OSX

On Unix, pip will change current working directory to whereever it has
extracted the downloaded package. On Mac OSX, it does not appear to do
that. To get around this difference, specify paths in setup.py relative
to the location of setup.py, rather than the current working directory.
This commit is contained in:
Sergei Trofimov 2015-05-13 16:59:11 +01:00
parent ee63cbde62
commit 48748797b7

View File

@ -23,7 +23,10 @@ try:
except ImportError:
from distutils.core import setup
sys.path.insert(0, './wlauto/core/')
wlauto_dir = os.path.join(os.path.dirname(__file__), 'wlauto')
sys.path.insert(0, os.path.join(wlauto_dir, 'core'))
from version import get_wa_version
# happends if falling back to distutils
@ -38,7 +41,7 @@ except OSError:
packages = []
data_files = {}
source_dir = os.path.dirname(__file__)
for root, dirs, files in os.walk('wlauto'):
for root, dirs, files in os.walk(wlauto_dir):
rel_dir = os.path.relpath(root, source_dir)
data = []
if '__init__.py' in files: