mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
build: improve pyjson5 module import
Trying to build on Gentoo Linux is failing with the following : > Traceback (most recent call last): > File "[...]/TR1X/tools/generate_init", line 7, in <module> > import pyjson5 > ModuleNotFoundError: No module named 'pyjson5' On Gentoo, pyjson5 module is installed as json5. Signed-off-by: Fabrice Delliaux <netbox253@gmail.com>
This commit is contained in:
parent
e353b50be8
commit
420143d76e
1 changed files with 4 additions and 1 deletions
|
@ -4,7 +4,10 @@ import io
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pyjson5
|
||||
try:
|
||||
import pyjson5
|
||||
except ImportError:
|
||||
import json5 as pyjson5
|
||||
|
||||
REPO_DIR = Path(__file__).parent.parent
|
||||
BIN_DIR = REPO_DIR / "bin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue