diff options
Diffstat (limited to 'py/python')
-rw-r--r-- | py/python/Ice.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/py/python/Ice.py b/py/python/Ice.py index 7133fd5956f..ef8c253d829 100644 --- a/py/python/Ice.py +++ b/py/python/Ice.py @@ -294,6 +294,14 @@ def getSliceDir(): '''Convenience function for locating the directory containing the Slice files.''' # + # Detect setup.py installation in site-packages. The slice + # files live along side Ice.py + # + dir = os.path.join(os.path.dirname(__file__), "slice") + if os.path.isdir(dir): + return dir + + # # Get the parent of the directory containing this file (Ice.py). # pyHome = os.path.join(os.path.dirname(__file__), "..") |