File: deb-specific_python-install.patch

package info (click to toggle)
owfs 2.8p15-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,460 kB
  • sloc: ansic: 56,355; sh: 11,666; tcl: 1,962; makefile: 1,163; python: 1,114; php: 600; perl: 393; cpp: 105
file content (36 lines) | stat: -rw-r--r-- 1,654 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Force Debian layout for python modules
--- a/module/ownet/python/Makefile.am
+++ b/module/ownet/python/Makefile.am
@@ -6,7 +6,9 @@
 #	OpenSUSE is buggy and install libraries at /usr/local.
 #	Need to add call "install_lib --install-dir" or call "install --install-lib"
 #	$(PYTHON) setup.py install_lib --install-dir="/$(DESTDIR)$(PYSITEDIR)"
-	$(PYTHON) setup.py install --install-lib="$(DESTDIR)$(PYSITEDIR)"
+	set -e ; set -x ; for p in $$(pyversions -r ../../../debian/control) ; do \
+		$$p setup.py install --install-layout=deb --root=$(DESTDIR) ; \
+	done
 # Other options are (but not needed): --install-data="/$(DESTDIR)$(PYSITEDIR)" --install-script="/$(DESTDIR)$(PYSITEDIR)" --install-header=
 
 clean-local:
--- a/module/swig/python/Makefile.am
+++ b/module/swig/python/Makefile.am
@@ -11,13 +11,17 @@
 	$(SWIG) -python -o $@ ../ow.i
 
 OW.py: ow_wrap.c setup.py $(LIBOW)
-	CFLAGS="" $(PYTHON) setup.py build
+	set -e ; set -x ; for p in $$(pyversions -r ../../../debian/control) ; do \
+		CFLAGS="" $$p setup.py build ; \
+	done
 
 install-data-local:
 #	OpenSUSE is buggy and install libraries at /usr/local.
 #	Need to add call "install_lib --install-dir" or call "install --install-lib"
 #	$(PYTHON) setup.py install_lib --install-dir="/$(DESTDIR)$(PYSITEDIR)"
-	$(PYTHON) setup.py install --install-lib="$(DESTDIR)$(PYSITEDIR)"
+	set -e ; set -x ; for p in $$(pyversions -r ../../../debian/control) ; do \
+		$$p setup.py install --install-layout=deb --root=$(DESTDIR) ; \
+	done
 # Other options are (but not needed): --install-data="/$(DESTDIR)$(PYSITEDIR)" --install-script="/$(DESTDIR)$(PYSITEDIR)" --install-header=
 
 clean-local: