]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Allow installation from alternate directories
authorMenno Smits <menno@freshfoo.com>
Tue, 16 Aug 2016 12:11:24 +0000 (00:11 +1200)
committerMenno Smits <menno@freshfoo.com>
Tue, 16 Aug 2016 12:11:24 +0000 (00:11 +1200)
Installation used to fail if setup.py wasn't in the current working
directory.

Fixes #207.

--HG--
branch : stable

setup.py

index 897e7161458ceec889c7d15e2b6e856b8b2d5cab..d288e227d00baa69ee0991f9406a97777f6da421 100644 (file)
--- 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)