mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
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:
parent
d9e3dae5f6
commit
9797bd151e
@ -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:
|
||||||
|
2362
source-builder/sb/imports/argparse.py
Normal file
2362
source-builder/sb/imports/argparse.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user