Skip to content

Commit

Permalink
Adding pg8000 submodule.
Browse files Browse the repository at this point in the history
  • Loading branch information
cluther committed May 27, 2011
1 parent a7466e8 commit ddfb9ac
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/pg8000"]
path = src/pg8000
url = https://github.com/mfenniak/pg8000.git
40 changes: 40 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -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

21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/pg8000
Submodule pg8000 added at 5484f9

0 comments on commit ddfb9ac

Please sign in to comment.