Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5dc1f22

Browse files
committed
make setup.py test work when called from other directory
1 parent d2ee9fc commit 5dc1f22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setupext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def extract_versions():
107107
Extracts version values from the main matplotlib __init__.py and
108108
returns them as a dictionary.
109109
"""
110-
with open('lib/matplotlib/__init__.py') as fd:
110+
with open(os.path.join(os.path.dirname(__file__),
111+
'lib/matplotlib/__init__.py')) as fd:
111112
for line in fd.readlines():
112113
if (line.startswith('__version__')):
113114
exec(line.strip())

0 commit comments

Comments
 (0)