From: Menno Smits Date: Tue, 16 Aug 2016 12:11:24 +0000 (+1200) Subject: Allow installation from alternate directories X-Git-Tag: 1.0.2~10 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8d8cf6cf216725a0564b070331ed26904a838ff3;p=imapclient.git Allow installation from alternate directories Installation used to fail if setup.py wasn't in the current working directory. Fixes #207. --HG-- branch : stable --- diff --git a/setup.py b/setup.py index 897e716..d288e22 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,8 @@ IS_PY_26_OR_OLDER = MAJ_MIN <= (2, 6) IS_PY_34_OR_NEWER = MAJ_MIN >= (3, 4) # Read version info -version_file = path.join('imapclient', 'version.py') +here = path.dirname(__file__) +version_file = path.join(here, 'imapclient', 'version.py') info = {} if IS_PY3: exec(open(version_file).read(), {}, info)