From 8d8cf6cf216725a0564b070331ed26904a838ff3 Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Wed, 17 Aug 2016 00:11:24 +1200 Subject: [PATCH] Allow installation from alternate directories Installation used to fail if setup.py wasn't in the current working directory. Fixes #207. --HG-- branch : stable --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.43.0