summaryrefslogtreecommitdiff
path: root/py/python/Ice.py
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2008-06-17 12:56:34 +0800
committerMatthew Newhook <matthew@zeroc.com>2008-06-17 12:56:34 +0800
commit4e40e22bfb7f2e8dce8859ab2104b91882b55f61 (patch)
treefefeb0fe8664378544f956db5acc59dc72a6707a /py/python/Ice.py
parentremove double build in the interceptor test. (diff)
downloadice-4e40e22bfb7f2e8dce8859ab2104b91882b55f61.tar.bz2
ice-4e40e22bfb7f2e8dce8859ab2104b91882b55f61.tar.xz
ice-4e40e22bfb7f2e8dce8859ab2104b91882b55f61.zip
http://bugzilla/bugzilla/show_bug.cgi?id=3265
- Simplified the python implementation of Ice.getSliceDir - Added ruby implementation of Ice.getSliceDir - Adjusted demos & tests to use Ice.getSliceDir appropriately.
Diffstat (limited to 'py/python/Ice.py')
-rw-r--r--py/python/Ice.py31
1 files changed, 3 insertions, 28 deletions
diff --git a/py/python/Ice.py b/py/python/Ice.py
index 2e8caa6267c..1682b85b302 100644
--- a/py/python/Ice.py
+++ b/py/python/Ice.py
@@ -103,14 +103,6 @@ class UserException(Exception):
#
def getSliceDir():
#
- # Check for <ICE_HOME>/slice first.
- #
- if os.environ.has_key("ICE_HOME"):
- dir = os.path.join(os.environ["ICE_HOME"], "slice")
- if os.path.exists(dir):
- return dir
-
- #
# Get the parent of the directory containing this file (Ice.py).
#
pyHome = os.path.join(os.path.dirname(__file__), "..")
@@ -133,28 +125,11 @@ def getSliceDir():
iceVer = stringVersion()
- #
- # Check platform-specific locations.
- #
- if sys.platform[:6] == "cygwin" or sys.platform == "win32":
- dir = os.path.join("\\", "Ice-" + iceVer, "slice")
- if os.path.exists(dir):
- return dir
- dir = os.path.join("C:\\", "Ice-" + iceVer, "slice")
- if os.path.exists(dir):
- return dir
- else:
- if sys.platform[:5] == "linux":
- #
- # Check the default RPM location.
- #
- dir = os.path.join("/", "usr", "share", "Ice-" + iceVer, "slice")
- if os.path.exists(dir):
- return dir
+ if sys.platform[:5] == "linux":
#
- # Check in /opt.
+ # Check the default RPM location.
#
- dir = os.path.join("/", "opt", "Ice-" + iceVer, "slice")
+ dir = os.path.join("/", "usr", "share", "Ice-" + iceVer, "slice")
if os.path.exists(dir):
return dir