summaryrefslogtreecommitdiffstats
path: root/source-builder/pkg-config
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-02-14 13:26:11 +1100
committerChris Johns <chrisj@rtems.org>2014-02-14 13:26:11 +1100
commit9797bd151e1a53985397cc8676fac3ecd16a4854 (patch)
tree3bfe48b2d17e891013d9b41e6653621a891d7669 /source-builder/pkg-config
parentconfig: Set the LD/DYLD temporary path for configure and make. (diff)
downloadrtems-source-builder-9797bd151e1a53985397cc8676fac3ecd16a4854.tar.bz2
sb: Clean up using argparse. It is not available on CentOS.
Include the argparse package in the source and use if not available.
Diffstat (limited to 'source-builder/pkg-config')
-rwxr-xr-xsource-builder/pkg-config11
1 files changed, 10 insertions, 1 deletions
diff --git a/source-builder/pkg-config b/source-builder/pkg-config
index ae193ff..5606f4d 100755
--- a/source-builder/pkg-config
+++ b/source-builder/pkg-config
@@ -29,7 +29,6 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-import argparse
import os
import sys
@@ -37,6 +36,16 @@ base = os.path.dirname(sys.argv[0])
sys.path.insert(0, base + '/sb')
try:
+ import argparse
+except:
+ sys.path.insert(0, base + '/sb/imports')
+ try:
+ import argparse
+ except:
+ print >> sys.stderr, "Incorrect Source Builder installation"
+ sys.exit(1)
+
+try:
import pkgconfig
except ImportError:
print >> sys.stderr, "Incorrect Source Builder installation"