Permalink
Browse files

Adding pg8000 submodule.

  • Loading branch information...
1 parent a7466e8 commit ddfb9ac5683d0cb8a3a2ed5581d05f46bf7445d9 @cluther cluther committed May 27, 2011
Showing with 65 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +40 −0 GNUmakefile
  3. +21 −0 setup.py
  4. +1 −0 src/pg8000
View
@@ -0,0 +1,3 @@
+[submodule "src/pg8000"]
+ path = src/pg8000
+ url = https://github.com/mfenniak/pg8000.git
View
@@ -0,0 +1,40 @@
+###########################################################################
+#
+# This program is part of Zenoss Core, an open source monitoring platform.
+# Copyright (C) 2011, Zenoss Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 or (at your
+# option) any later version as published by the Free Software Foundation.
+#
+# For complete information please visit: http://www.zenoss.com/oss/
+#
+###########################################################################
+
+PYTHON=python
+SRC_DIR=$(PWD)/src
+PG8000_DIR=$(SRC_DIR)/pg8000
+ZP_DIR=$(PWD)/ZenPacks/zenoss/PostgreSQL
+BIN_DIR=$(ZP_DIR)/bin
+LIB_DIR=$(ZP_DIR)/lib
+
+default: egg
+
+egg:
+ # setup.py will call 'make build' before creating the egg
+ python setup.py bdist_egg
+
+build:
+ git submodule init ; \
+ git submodule update ; \
+ cd $(PG8000_DIR) ; \
+ PYTHONPATH="$(PYTHONPATH):$(LIB_DIR)" \
+ $(PYTHON) setup.py install \
+ --install-lib="$(LIB_DIR)" \
+ --install-scripts="$(BIN_DIR)"
+
+clean:
+ rm -rf build dist *.egg-info
+ find . -name '*.pyc' | xargs rm
+ cd $(PG8000_DIR) ; rm -rf build dist *.egg-info
+
View
@@ -1,3 +1,16 @@
+###########################################################################
+#
+# This program is part of Zenoss Core, an open source monitoring platform.
+# Copyright (C) 2011, Zenoss Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 or (at your
+# option) any later version as published by the Free Software Foundation.
+#
+# For complete information please visit: http://www.zenoss.com/oss/
+#
+###########################################################################
+
################################
# These variables are overwritten by Zenoss when the ZenPack is exported
# or saved. Do not modify them directly here.
@@ -17,6 +30,14 @@
from setuptools import setup, find_packages
+# make build
+import subprocess
+p = subprocess.Popen('make build', shell=True)
+if p.poll() == None:
+ p.wait()
+if p.returncode != 0:
+ raise Exception('make exited with an error: %s' % p.returncode)
+
setup(
# This ZenPack metadata should usually be edited with the Zenoss
# ZenPack edit page. Whenever the edit page is submitted it will
Submodule pg8000 added at 5484f9

0 comments on commit ddfb9ac

Please sign in to comment.