[omd-commits] OMD Git: omd: python-modules: Cleaned up access to some built .egg files

git version control git at mathias-kettner.de
Wed Jun 8 10:46:56 CEST 2016


Module:   omd
Branch:   master
Commit:   e2c2fa89e1a15dcfb1b33c8cc07609066814a080
URL:      http://omdistro.org/projects/omd/repository/revisions/e2c2fa89e1a15dcfb1b33c8cc07609066814a080

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Wed Jun  8 10:46:54 2016 +0200
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Wed Jun  8 10:46:54 2016 +0200

python-modules: Cleaned up access to some built .egg files

---

 packages/python-modules/Makefile |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/packages/python-modules/Makefile b/packages/python-modules/Makefile
index e34a166..5bb6a4b 100644
--- a/packages/python-modules/Makefile
+++ b/packages/python-modules/Makefile
@@ -93,11 +93,22 @@ install:
 	        cd .. ; \
 	    done
 	
+	# Cleanup some unwanted files (example scripts)
+	rm -f $(DESTDIR)$(OMD_ROOT)/bin/*.py || true
+	
 	# Fix python interpreter for kept scripts
-	sed -i "1s|^#!.*python|#!$(OMD_ROOT)/bin/python|" \
-	    $(DESTDIR)$(OMD_ROOT)/bin/easy_install \
-	    $(DESTDIR)$(OMD_ROOT)/bin/easy_install-2.7 \
-	    $(DESTDIR)$(OMD_ROOT)/bin/libsmi2pysnmp
+	for F in $(DESTDIR)$(OMD_ROOT)/bin/easy_install \
+		 $(DESTDIR)$(OMD_ROOT)/bin/easy_install-2.7 \
+		 $(DESTDIR)$(OMD_ROOT)/bin/libsmi2pysnmp \
+		 $(DESTDIR)$(OMD_ROOT)/bin/pip \
+		; do \
+	    if [ -f $$F ]; then \
+		sed -i "1s|^#!.*python|#!/usr/bin/env python|" $$F; \
+	    fi ; \
+	done
+	
+	# Cleanup build time paths in easy-install.pth
+	sed -i 's|^/.*/\(.*\.egg\)$$|./\1|g' $(DESTDIR)$(OMD_ROOT)/lib/python/easy-install.pth
 
 skel:
 



More information about the omd-commits mailing list