summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/config/install_dir5
-rw-r--r--python/config/zeroc-ice.pth1
-rw-r--r--python/python/Makefile7
3 files changed, 10 insertions, 3 deletions
diff --git a/python/config/install_dir b/python/config/install_dir
index ed3e3a0a4eb..30da8f10749 100644
--- a/python/config/install_dir
+++ b/python/config/install_dir
@@ -26,10 +26,11 @@ class easy_install_default(easy_install):
self.finalized = 0
e = easy_install_default()
-import distutils.errors
+import os, distutils.errors
try:
e.finalize_options()
except distutils.errors.DistutilsError:
pass
-print(e.install_dir)
+# Place the source files and the extension in a subdirectory of the installation directory.
+print(os.path.join(e.install_dir, "zeroc-ice"))
diff --git a/python/config/zeroc-ice.pth b/python/config/zeroc-ice.pth
new file mode 100644
index 00000000000..78c57de7dca
--- /dev/null
+++ b/python/config/zeroc-ice.pth
@@ -0,0 +1 @@
+zeroc-ice
diff --git a/python/python/Makefile b/python/python/Makefile
index a7e5b38d657..92174733653 100644
--- a/python/python/Makefile
+++ b/python/python/Makefile
@@ -24,6 +24,12 @@ install:: | $(DESTDIR)$(install_pythondir)
$(E) "Installing generated code"
$(Q)$(INSTALL) *.py $(DESTDIR)$(install_pythondir)
+ifneq ($(usr_dir_install),)
+install:: | $(DESTDIR)$(install_pythondir)
+ $(E) "Installing .pth file"
+ $(Q)$(INSTALL) ../config/zeroc-ice.pth $(DESTDIR)$(install_pythondir)/..
+endif
+
$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,Ice,--no-package))
$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,Glacier2,--no-package))
$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,IceBox))
@@ -36,4 +42,3 @@ $(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,IceStorm))
# IceMX package is updated.
$(eval $(call make-python-slice,$(slicedir),$(lang_srcdir)/python,Ice,Metrics))
$(eval $(call make-python-slice,$(slicedir),$(lang_srcdir)/python,Glacier2,Metrics))
-