Skip to contentSkip to conversation

add check for python-devel to tools build

PATCH In review Jan Beulich 5 participants 8 messages Nov 21, 2006 – Nov 22, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add check for python-devel to tools build

Again, this must be given exec permission after applying.

tools/check/check_python_devel new file +13 -0
Index: 2006-11-17/tools/check/check_python_devel
===================================================================
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error
#1 lore raw
Quoted 12 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel new file +3 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+

tools/check/check_python_devel line 13

Quoted 10 lines
tools/check/check_python_devel new file +10 -0
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

Urm, python is in /usr/$lib/python2.4 on my systems (or python2.5, etc)

Is there some way you can run the 'python' binary and ask it what its install prefix is, rather than hardcoding it?

Regards,
Dan.

Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
#2 lore raw
In reply to Jan Beulich
Quoted 12 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel new file +3 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+

tools/check/check_python_devel line 13

Quoted 10 lines
tools/check/check_python_devel new file +10 -0
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

There is no /usr/lib/python/config/Makefile on Ubuntu. You should be okay if you also check for /usr/lib/python-2.[345]/config/Makefile.

Regards,

Anthony Liguori

#3 lore raw
Quoted 19 lines · Anthony Liguori
Quoted 18 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel new file +0 -0

12:03:08.000000000 +0100

tools/check/check_python_devel new file +8 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
Quoted 8 lines

tools/check/check_python_devel line 13

Quoted 5 lines
tools/check/check_python_devel new file +5 -0
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

There is no /usr/lib/python/config/Makefile on Ubuntu. You should be okay if you also check for /usr/lib/python-2.[345]/config/Makefile.

My Debian box has /usr/lib/python2.3. How about /usr/lib/python*/config/Makefile? That should be OK, and has the advantage of including /usr/lib/python.

Ewan.

#4 lore raw
Quoted 30 lines · Ewan Mellor
Quoted 19 lines · Anthony Liguori
Quoted 18 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel new file +0 -0

12:03:08.000000000 +0100

tools/check/check_python_devel new file +8 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
Quoted 8 lines

tools/check/check_python_devel line 13

Quoted 5 lines
tools/check/check_python_devel new file +5 -0
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

There is no /usr/lib/python/config/Makefile on Ubuntu. You should be okay if you also check for /usr/lib/python-2.[345]/config/Makefile.

Quoted 3 lines

My Debian box has /usr/lib/python2.3. How about /usr/lib/python*/config/Makefile? That should be OK, and has the advantage of including /usr/lib/python.

Using wildcards though will not be reliable. eg I have both python 2.3 and 2.4 installed, but python 2.4 is the version I'm deploying Xen against. This test won't catch the case where I have python-devel = 2.3, but don't have the python-devel == 2.4 installed. We want to make sure we only check against the version we're actually building against.

Regards,
Dan.

Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
#5 lore raw
Quoted 35 lines · Daniel P. Berrange
Quoted 30 lines · Ewan Mellor
Quoted 19 lines · Anthony Liguori
Quoted 18 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel new file +0 -0

12:03:08.000000000 +0100

tools/check/check_python_devel new file +8 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
Quoted 8 lines

tools/check/check_python_devel line 13

Quoted 5 lines
tools/check/check_python_devel new file +5 -0
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

There is no /usr/lib/python/config/Makefile on Ubuntu. You should be okay if you also check for /usr/lib/python-2.[345]/config/Makefile.

Quoted 3 lines

My Debian box has /usr/lib/python2.3. How about /usr/lib/python*/config/Makefile? That should be OK, and has the advantage of including /usr/lib/python.

Quoted 5 lines

Using wildcards though will not be reliable. eg I have both python 2.3 and 2.4 installed, but python 2.4 is the version I'm deploying Xen against. This test won't catch the case where I have python-devel = 2.3, but don't have the python-devel == 2.4 installed. We want to make sure we only check against the version we're actually building against.

python -c '
import os.path, sys
for p in sys.path:
if os.path.exists(p + "/config/Makefile"):

    sys.exit(0)

sys.exit(1)
'

Ewan.

#6 lore raw

Keir - will you integrate this, or should I re-post a patch?

Quoted 1 line
Quoted 1 line
Quoted 1 line

Ewan Mellor <[email protected]> 21.11.06 18:23 >>>

Quoted 35 lines · Daniel P. Berrange
Quoted 30 lines · Ewan Mellor
Quoted 19 lines · Anthony Liguori
Quoted 18 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel new file +0 -0

12:03:08.000000000 +0100

tools/check/check_python_devel new file +8 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
Quoted 8 lines

tools/check/check_python_devel line 13

Quoted 5 lines
tools/check/check_python_devel new file +5 -0
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

There is no /usr/lib/python/config/Makefile on Ubuntu. You should be okay if you also check for /usr/lib/python-2.[345]/config/Makefile.

Quoted 3 lines

My Debian box has /usr/lib/python2.3. How about /usr/lib/python*/config/Makefile? That should be OK, and has the advantage of including /usr/lib/python.

Quoted 5 lines

Using wildcards though will not be reliable. eg I have both python 2.3 and 2.4 installed, but python 2.4 is the version I'm deploying Xen against. This test won't catch the case where I have python-devel = 2.3, but don't have the python-devel == 2.4 installed. We want to make sure we only check against the version we're actually building against.

python -c '
import os.path, sys
for p in sys.path:
if os.path.exists(p + "/config/Makefile"):

    sys.exit(0)

sys.exit(1)
'

Ewan.

#7 lore raw

Please re-post.

Quoted 57 lines · Jan Beulich

Keir - will you integrate this, or should I re-post a patch?

Quoted 1 line
Quoted 1 line
Quoted 1 line

Ewan Mellor <[email protected]> 21.11.06 18:23 >>>

Quoted 36 lines · Daniel P. Berrange
Quoted 30 lines · Ewan Mellor
Quoted 19 lines · Anthony Liguori
Quoted 18 lines · Jan Beulich

Again, this must be given exec permission after applying.

Index: 2006-11-17/tools/check/check_python_devel
===================================================================

tools/check/check_python_devel 2006-11-21 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +0 -0

12:03:08.000000000 +0100

tools/check/check_python_devel 2006-11-21 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +8 -0
@@ -0,0 +1,13 @@
+#!/bin/bash
+# CHECK-BUILD
+
+function error {
+    echo
+    echo "  *** Check for python development environment FAILED"
+    exit 1
+}
Quoted 8 lines

tools/check/check_python_devel 2006-11-21 line 13

Quoted 5 lines
tools/check/check_python_devel 2006-11-21 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +5 -0
+
+lib=lib
+test "$(uname -m)" != x86_64 || lib=lib64
+set -e
+[ -e /usr/$lib/python/config/Makefile ] || error

There is no /usr/lib/python/config/Makefile on Ubuntu. You should be okay if you also check for /usr/lib/python-2.[345]/config/Makefile.

Quoted 4 lines

My Debian box has /usr/lib/python2.3. How about /usr/lib/python*/config/Makefile? That should be OK, and has the advantage of
including /usr/lib/python.

Quoted 6 lines

Using wildcards though will not be reliable. eg I have both python 2.3 and 2.4
installed, but python 2.4 is the version I'm deploying Xen against. This test won't catch the case where I have python-devel = 2.3, but don't have the python-devel == 2.4 installed. We want to make sure we only check against the version we're actually building against.

python -c '
import os.path, sys
for p in sys.path:
if os.path.exists(p + "/config/Makefile"):

    sys.exit(0)

sys.exit(1)
'

Ewan.