Merge branch 'bugfix/use_local_kconfiglib_v3.3' into 'release/v3.3'

Use kconfiglib from $IDF_PATH/tools/kconfig_new (v3.3)

See merge request espressif/esp-idf!6080
This commit is contained in:
Angus Gratton 2019-09-13 14:47:47 +08:00
commit cc68a512d2
4 changed files with 23 additions and 6 deletions

View file

@ -30,7 +30,12 @@ import json
import re import re
import gen_kconfig_doc import gen_kconfig_doc
import kconfiglib
try:
from . import kconfiglib
except Exception:
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import kconfiglib
__version__ = "0.1" __version__ = "0.1"

View file

@ -6,12 +6,17 @@
from __future__ import print_function from __future__ import print_function
import argparse import argparse
import json import json
import kconfiglib
import os import os
import sys import sys
import confgen import confgen
from confgen import FatalError, __version__ from confgen import FatalError, __version__
try:
from . import kconfiglib
except Exception:
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import kconfiglib
# Min/Max supported protocol versions # Min/Max supported protocol versions
MIN_PROTOCOL_VERSION = 1 MIN_PROTOCOL_VERSION = 1
MAX_PROTOCOL_VERSION = 2 MAX_PROTOCOL_VERSION = 2

View file

@ -21,8 +21,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function from __future__ import print_function
import os
import re import re
import kconfiglib import sys
try:
from . import kconfiglib
except Exception:
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import kconfiglib
# Indentation to be used in the generated file # Indentation to be used in the generated file
INDENT = ' ' INDENT = ' '

View file

@ -19,11 +19,11 @@ from pyparsing import Word, printables, Combine, Literal, hexnums, quotedString,
import sys import sys
try: try:
import kconfiglib from . import kconfiglib
except ImportError: except Exception:
parent_dir_name = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) parent_dir_name = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
kconfig_new_dir = os.path.abspath(parent_dir_name + "/kconfig_new") kconfig_new_dir = os.path.abspath(parent_dir_name + "/kconfig_new")
sys.path.append(kconfig_new_dir) sys.path.insert(0, kconfig_new_dir)
import kconfiglib import kconfiglib