summary refs log tree commit diff
path: root/pkgs/tools/filesystems/ceph/fix-pythonpath.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/ceph/fix-pythonpath.patch')
-rw-r--r--pkgs/tools/filesystems/ceph/fix-pythonpath.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/ceph/fix-pythonpath.patch b/pkgs/tools/filesystems/ceph/fix-pythonpath.patch
new file mode 100644
index 00000000000..7458a46aca1
--- /dev/null
+++ b/pkgs/tools/filesystems/ceph/fix-pythonpath.patch
@@ -0,0 +1,31 @@
+diff --git a/src/Makefile-env.am b/src/Makefile-env.am
+index e176596..384e230 100644
+--- a/src/Makefile-env.am
++++ b/src/Makefile-env.am
+@@ -40,7 +40,7 @@ check_SCRIPTS =
+ export VERBOSE = true
+ 
+ # python unit tests need to know where the scripts are located
+-export PYTHONPATH=$(top_srcdir)/src/pybind
++export PYTHONPATH+=:$(top_srcdir)/src/pybind
+ 
+ # when doing a debug build, make sure to make the targets
+ if WITH_DEBUG
+diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am
+index 3e5ad03..66d6683 100644
+--- a/src/ceph-detect-init/Makefile.am
++++ b/src/ceph-detect-init/Makefile.am
+@@ -64,9 +64,10 @@ install-data-local::
+ 	if test "$(DESTDIR)" ; then \
+ 		if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
+ 			options=--install-layout=deb ; \
+-		else \
+-			options=--prefix=/usr ; \
+ 		fi ; \
+ 		root="--root=$(DESTDIR)" ; \
+ 	fi ; \
+-	python setup.py install $$root $$options
++	if test "$(prefix)"; then \
++		prefix="--prefix=$(prefix)" ; \
++	fi ; \
++	python setup.py install $$prefix $$root $$options