mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
tools: ynl: add script dir to sys.path
Python options like PYTHONSAFEPATH or -P [1] do not add script directory to PYTHONPATH. ynl depends on this path to build and run. [1] This option is default for Fedora rpmbuild since introduction of https://fedoraproject.org/wiki/Changes/PythonSafePath Signed-off-by: Jan Stancek <jstancek@redhat.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/b26537cdb6e1b24435b50b2ef81d71f31c630bc1.1731399562.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5c46638540
commit
c3b3eb565b
@ -3,10 +3,13 @@
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import pathlib
|
||||
import pprint
|
||||
import sys
|
||||
import time
|
||||
import signal
|
||||
|
||||
sys.path.append(pathlib.Path(__file__).resolve().parent.as_posix())
|
||||
from lib import YnlFamily, Netlink, NlError
|
||||
|
||||
|
||||
|
@ -3,11 +3,13 @@
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import pathlib
|
||||
import pprint
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
|
||||
sys.path.append(pathlib.Path(__file__).resolve().parent.as_posix())
|
||||
from lib import YnlFamily
|
||||
|
||||
def args_to_req(ynl, op_name, args, req):
|
||||
|
@ -4,12 +4,15 @@
|
||||
import argparse
|
||||
import collections
|
||||
import filecmp
|
||||
import pathlib
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import yaml
|
||||
|
||||
sys.path.append(pathlib.Path(__file__).resolve().parent.as_posix())
|
||||
from lib import SpecFamily, SpecAttrSet, SpecAttr, SpecOperation, SpecEnumSet, SpecEnumEntry
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user