From 0694253b5e99de0d8e2e77bf186680b1f6479c27 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Wed, 5 Aug 2015 16:29:48 -0400 Subject: python-psycopg2: reinstate patch to avoid pg_config When building we get an error: Error: pg_config executable not found. Previously there was a patch that removed references to pg_config. This patch was dropped during the version uprev for an unknown reason. Reinstate this patch with minor updates to allow it to patch the new version of python-psycopg2 and get the build working again. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- .../python/python-psycopg2/remove-pg-config.patch | 63 ++++++++++++++-------- 1 file changed, 42 insertions(+), 21 deletions(-) (limited to 'meta-openstack/recipes-devtools/python/python-psycopg2') diff --git a/meta-openstack/recipes-devtools/python/python-psycopg2/remove-pg-config.patch b/meta-openstack/recipes-devtools/python/python-psycopg2/remove-pg-config.patch index 6b72ef7..b2f94dd 100644 --- a/meta-openstack/recipes-devtools/python/python-psycopg2/remove-pg-config.patch +++ b/meta-openstack/recipes-devtools/python/python-psycopg2/remove-pg-config.patch @@ -1,14 +1,37 @@ -Upstream-status: Inappropriate [embedded specific] +From 392c4581da49f133938e70f6215bfebba28ecc56 Mon Sep 17 00:00:00 2001 +From: Mark Asselstine +Date: Tue, 4 Aug 2015 20:59:18 -0400 +Subject: [PATCH] setup: don't use pg_config -The package uses the pg_config command to detect the libdir and includedir path. -Commented the lines because the command is not available at buildtime and the -package succesfully build without them. +The package uses the pg_config command to detect the libdir and +includedir path. Commented the lines because the command is not +available at buildtime and the package succesfully build without them. -Index: psycopg2-2.5/setup.py -=================================================================== ---- psycopg2-2.5.orig/setup.py -+++ psycopg2-2.5/setup.py -@@ -377,9 +377,6 @@ +Signed-off-by: Mark Asselstine +Signed-off-by: Mark Asselstine +--- + setup.cfg | 2 +- + setup.py | 5 +---- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/setup.cfg b/setup.cfg +index 90a47dd..986871b 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -9,7 +9,7 @@ define= + # build psycopg2. If pg_config is not in the path or is installed under a + # different name uncomment the following option and set it to the pg_config + # full path. +-#pg_config= ++pg_config="/bin/true" + + # Set to 1 to use Python datetime objects for default date/time representation. + use_pydatetime=1 +diff --git a/setup.py b/setup.py +index 975fe10..85502ca 100644 +--- a/setup.py ++++ b/setup.py +@@ -389,16 +389,13 @@ class psycopg_build_ext(build_ext): self.libraries.append("pq") try: @@ -18,16 +41,14 @@ Index: psycopg2-2.5/setup.py try: # Here we take a conservative approach: we suppose that # *at least* PostgreSQL 7.4 is available (this is the only -Index: psycopg2-2.5/setup.cfg -=================================================================== ---- psycopg2-2.5.orig/setup.cfg -+++ psycopg2-2.5/setup.cfg -@@ -11,7 +11,7 @@ - # build psycopg2. If pg_config is not in the path or is installed under a - # different name uncomment the following option and set it to the pg_config - # full path. --#pg_config= -+pg_config="/bin/true" + # 7.x series supported by psycopg 2) + pgversion = pg_config_helper.query("version").split()[1] + except: +- pgversion = "7.4.0" ++ pgversion = "9.4.4" - # Set to 1 to use Python datetime objects for default date/time representation. - use_pydatetime=1 + verre = re.compile( + r"(\d+)\.(\d+)(?:(?:\.(\d+))|(devel|(alpha|beta|rc)\d+))") +-- +2.1.4 + -- cgit v1.2.3-54-g00ecf