Skip to content

Commit a2b935c

Browse files
committed
Make setupegg symlink correct dateutil library
Setupegg assumes the install tree is the same as the source tree. This is not the case, since a different version of the dateutil library is used depending on whether python version 2 or 3 is used. This fix symlinks the correct version at run-time.
1 parent 9b7abbf commit a2b935c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

setupegg.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
Poor man's setuptools script...
33
"""
44

5+
import os
6+
import sys
57
from setuptools import setup
8+
9+
# Setupegg assumes the install tree and source tree are exactly the same. Since
10+
# this is not the case, symlink the correct dateutil dir depending on which
11+
# version of python is used
12+
os.chdir('lib')
13+
if not os.path.isdir('dateutil'):
14+
if sys.version_info[0] >= 3:
15+
os.symlink('dateutil_py3', 'dateutil')
16+
else:
17+
os.symlink('dateutil_py2', 'dateutil')
18+
os.chdir('..')
19+
620
execfile('setup.py',
721
{'additional_params' :
822
{'namespace_packages' : ['mpl_toolkits'],

0 commit comments

Comments
 (0)