f4pga: rm sf_ prefixes

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-03-01 04:02:51 +01:00
parent fcb4ce8811
commit c44a0e164c
21 changed files with 72 additions and 61 deletions

View File

@ -28,18 +28,29 @@ from os import environ
import json
from typing import Iterable
from colorama import Fore, Style
from f4pga.sf_common import ResolutionEnv, fatal, scan_modules, set_verbosity_level, \
from f4pga.common import (
ResolutionEnv,
fatal,
scan_modules,
set_verbosity_level,
sfprint
from f4pga.sf_module import *
from f4pga.sf_cache import SymbiCache
import f4pga.sf_ugly as sf_ugly
from f4pga.sf_flow_config import ProjectFlowConfig, FlowConfig, FlowDefinition, \
open_project_flow_cfg, verify_platform_name, \
)
from f4pga.module import *
from f4pga.cache import SymbiCache
import f4pga.ugly as ugly
from f4pga.flow_config import (
ProjectFlowConfig,
FlowConfig,
FlowDefinition,
open_project_flow_cfg,
verify_platform_name,
verify_stage
from f4pga.sf_module_runner import *
from f4pga.sf_module_inspector import get_module_info
from f4pga.sf_stage import Stage
from f4pga.sf_argparse import setup_argparser, get_cli_flow_config
)
from f4pga.module_runner import *
from f4pga.module_inspector import get_module_info
from f4pga.stage import Stage
from f4pga.argparser import setup_argparser, get_cli_flow_config
SYMBICACHEPATH = '.symbicache'
@ -462,7 +473,7 @@ def setup_resolution_env():
'shareDir': share_dir_path,
'binDir': os.path.realpath(os.path.join(share_dir_path, '../../bin'))
})
r_env.add_values(sf_ugly.generate_values())
r_env.add_values(ugly.generate_values())
return r_env
def open_project_flow_config(path: str) -> ProjectFlowConfig:

View File

@ -31,9 +31,9 @@ def scan_modules(mypath: str):
sfbuild_home = mypath
sfbuild_home_dirs = os.listdir(sfbuild_home)
sfbuild_module_dirs = \
[dir for dir in sfbuild_home_dirs if re.match('sf_.*_modules$', dir)]
[dir for dir in sfbuild_home_dirs if re.match('.*_modules$', dir)]
_sfbuild_module_collection_name_to_path = \
dict([(re.match('sf_(.*)_modules$', moddir).groups()[0],
dict([(re.match('(.*)_modules$', moddir).groups()[0],
os.path.join(sfbuild_home, moddir))
for moddir in sfbuild_module_dirs])

View File

@ -5,8 +5,8 @@
# ----------------------------------------------------------------------------- #
import os
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -49,8 +49,8 @@ import os
import shutil
import re
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -27,9 +27,9 @@ Accepted module parameters:
# ----------------------------------------------------------------------------- #
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.sf_module_runner import get_module
from f4pga.common import *
from f4pga.module import *
from f4pga.module_runner import get_module
# ----------------------------------------------------------------------------- #

View File

@ -12,8 +12,8 @@ lazily create the directories if they become necessary. """
# ----------------------------------------------------------------------------- #
import os
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -6,8 +6,8 @@
import os
import re
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -5,8 +5,8 @@
# ----------------------------------------------------------------------------- #
import os
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -5,8 +5,8 @@
# ----------------------------------------------------------------------------- #
import os
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -6,8 +6,8 @@
import os
import shutil
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -5,8 +5,8 @@
# ----------------------------------------------------------------------------- #
import os
from f4pga.sf_common import *
from f4pga.sf_module import *
from f4pga.common import *
from f4pga.module import *
# ----------------------------------------------------------------------------- #

View File

@ -1,8 +1,8 @@
import os
import json
from f4pga.sf_common import file_noext, ResolutionEnv, deep
from f4pga.sf_stage import Stage
from f4pga.common import file_noext, ResolutionEnv, deep
from f4pga.stage import Stage
from copy import copy
_realpath_deep = deep(os.path.realpath)

View File

@ -2,7 +2,7 @@
import abc
from types import SimpleNamespace
from f4pga.sf_common import *
from f4pga.common import *
from colorama import Fore, Style
class Module:

View File

@ -1,5 +1,5 @@
from f4pga.sf_module import Module
from f4pga.sf_common import decompose_depname
from f4pga.module import Module
from f4pga.common import decompose_depname
from colorama import Style
def _get_if_qualifier(deplist: 'list[str]', qualifier: str):

View File

@ -4,8 +4,8 @@ from contextlib import contextmanager
import importlib
import importlib.util
import os
from f4pga.sf_module import Module, ModuleContext, get_mod_metadata
from f4pga.sf_common import ResolutionEnv, deep, sfprint
from f4pga.module import Module, ModuleContext, get_mod_metadata
from f4pga.common import ResolutionEnv, deep, sfprint
from colorama import Fore, Style
_realpath_deep = deep(os.path.realpath)

View File

@ -78,7 +78,7 @@ setuptools_setup(
url="https://github.com/chipsalliance/f4pga",
packages=[
"f4pga",
"f4pga.sf_common_modules",
"f4pga.common_modules",
"f4pga.wrappers.sh",
],
package_dir={"f4pga": "."},

View File

@ -1,6 +1,6 @@
from f4pga.sf_common import decompose_depname, resolve_modstr
from f4pga.sf_module import Module
from f4pga.sf_module_runner import get_module, module_io
from f4pga.common import decompose_depname, resolve_modstr
from f4pga.module import Module
from f4pga.module_runner import get_module, module_io
class StageIO:
"""

View File

@ -1,7 +1,7 @@
""" The "ugly" module is dedicated for some *ugly* workarounds """
import os
from f4pga.sf_common import sub as common_sub
from f4pga.common import sub as common_sub
def noisy_warnings():
""" Emit some noisy warnings """