Module: check_mk
Branch: master
Commit: 8e262fb0f99dea6fc13ea0cf222f2bfe3dc21582
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e262fb0f99dea…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri May 25 14:43:06 2018 +0200
Moved python-snap7 to python-modules.
Change-Id: Id732a4f304014f8cca2e1e96c347821500931808
---
omd/packages/python-modules/Makefile | 1 +
.../patches/0017-find-omd-snap7-library.dif} | 6 +++---
.../src}/python-snap7-0.9.tar.gz | Bin
omd/packages/snap7/.gitignore | 1 -
omd/packages/snap7/Makefile | 22 ---------------------
5 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/omd/packages/python-modules/Makefile b/omd/packages/python-modules/Makefile
index ef56b1d..734ef2d 100644
--- a/omd/packages/python-modules/Makefile
+++ b/omd/packages/python-modules/Makefile
@@ -125,6 +125,7 @@ MODULES += scandir-1.7.tar.gz
MODULES += pathlib2-2.3.2.tar.gz
# Added for scheduling (cmk/schedule.py)
MODULES += python-dateutil-2.6.1.tar.gz
+MODULES += python-snap7-0.9.tar.gz
.PHONY: build check-freetds install skel clean
diff --git a/omd/packages/snap7/python-patches/0001-find-omd-snap7-library.dif
b/omd/packages/python-modules/patches/0017-find-omd-snap7-library.dif
similarity index 62%
rename from omd/packages/snap7/python-patches/0001-find-omd-snap7-library.dif
rename to omd/packages/python-modules/patches/0017-find-omd-snap7-library.dif
index 7b02b1b..57d67d9 100644
--- a/omd/packages/snap7/python-patches/0001-find-omd-snap7-library.dif
+++ b/omd/packages/python-modules/patches/0017-find-omd-snap7-library.dif
@@ -1,6 +1,6 @@
-diff -Nur python-snap7-0.4.orig/snap7/common.py python-snap7-0.4/snap7/common.py
---- python-snap7-0.4.orig/snap7/common.py 2014-07-27 20:33:00.000000000 +0200
-+++ python-snap7-0.4/snap7/common.py 2015-02-18 10:31:15.711334756 +0100
+diff -Nur dest.orig/python-snap7-0.9/snap7/common.py
dest/python-snap7-0.9/snap7/common.py
+--- dest.orig/python-snap7-0.9/snap7/common.py 2014-07-27 20:33:00.000000000 +0200
++++ dest/python-snap7-0.9/snap7/common.py 2015-02-18 10:31:15.711334756 +0100
@@ -40,7 +40,7 @@
def __init__(self, lib_location=None):
if self.cdll:
diff --git a/omd/packages/snap7/python-snap7-0.9.tar.gz
b/omd/packages/python-modules/src/python-snap7-0.9.tar.gz
similarity index 100%
rename from omd/packages/snap7/python-snap7-0.9.tar.gz
rename to omd/packages/python-modules/src/python-snap7-0.9.tar.gz
diff --git a/omd/packages/snap7/.gitignore b/omd/packages/snap7/.gitignore
index dd08a21..e5683f0 100644
--- a/omd/packages/snap7/.gitignore
+++ b/omd/packages/snap7/.gitignore
@@ -1,2 +1 @@
-python-snap7-[0-9].[0-9]/
snap7-full-1.3.0/
diff --git a/omd/packages/snap7/Makefile b/omd/packages/snap7/Makefile
index a79670f..afb3679 100644
--- a/omd/packages/snap7/Makefile
+++ b/omd/packages/snap7/Makefile
@@ -1,14 +1,10 @@
include ../../Makefile.omd
# This package contains the SNAP 7 library (
http://snap7.sourceforge.net/)
-# and also the related python bindings (
https://pypi.python.org/pypi/python-snap7/).
-
NAME = snap7
VERSION = 1.3.0
DIR = snap7-full-$(VERSION)
-PY_DIR = python-snap7-0.9
-
ARCH = $(shell uname -m)
ifeq ($(ARCH),i686)
ARCH=i386
@@ -20,28 +16,10 @@ build: check-python
tar xzf $(DIR).tar.gz
cd $(DIR)/build/unix && $(MAKE) -f $(ARCH)_linux.mk
-# Now handle the python module
- tar xvzf $(PY_DIR).tar.gz
-
- set -e ; for p in python-patches/*.dif ; do \
- echo "applying $$p..." ; \
- patch -d $(PY_DIR) -p1 < $$p ; \
- done
-
install:
mkdir -p $(DESTDIR)$(OMD_ROOT)/lib
install -m 644 $(DIR)/build/bin/$(ARCH)-linux/libsnap7.so $(DESTDIR)$(OMD_ROOT)/lib
- mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/python && \
- export PYTHONPATH="$$PYTHONPATH:$(PACKAGE_PYTHON_PYTHONPATH)" ; \
- export LDFLAGS="$(PACKAGE_PYTHON_LDFLAGS)" ; \
- export LD_LIBRARY_PATH="$(PACKAGE_PYTHON_LD_LIBRARY_PATH)" ; \
- cd $(PY_DIR) && \
- $(PACKAGE_PYTHON_EXECUTABLE) setup.py install --home=$(DESTDIR)$(OMD_ROOT) \
- --prefix='' \
- --install-platlib=$(DESTDIR)$(OMD_ROOT)/lib/python \
- --install-purelib=$(DESTDIR)$(OMD_ROOT)/lib/python
-
skel:
clean: