sb: Clean up using argparse. It is not available on CentOS.

Include the argparse package in the source and use if not available.
This commit is contained in:
Chris Johns 2014-02-14 13:26:11 +11:00
parent d9e3dae5f6
commit 9797bd151e
3 changed files with 2372 additions and 2 deletions

View File

@ -29,13 +29,22 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
# #
import argparse
import os import os
import sys import sys
base = os.path.dirname(sys.argv[0]) base = os.path.dirname(sys.argv[0])
sys.path.insert(0, base + '/sb') 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: try:
import pkgconfig import pkgconfig
except ImportError: except ImportError:

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,6 @@
# provided by the full pkg-config so packages can configure and build. # provided by the full pkg-config so packages can configure and build.
# #
import argparse
import os import os
import os.path import os.path
import re import re