Exemple #1
0
        )
        os.rename(ARDUINO_FRAMEWORK_DIR, new_path)
        ARDUINO_FRAMEWORK_DIR = new_path
    assert ARDUINO_FRAMEWORK_DIR and os.path.isdir(ARDUINO_FRAMEWORK_DIR)

BUILD_DIR = env.subst("$BUILD_DIR")
CMAKE_API_REPLY_PATH = os.path.join(".cmake", "api", "v1", "reply")

try:
    import future
    import pyparsing
    import cryptography
except ImportError:
    env.Execute(
        env.VerboseAction(
            '$PYTHONEXE -m pip install "cryptography>=2.1.4" "future>=0.15.2" "pyparsing>=2.0.3,<2.4.0" ',
            "Installing ESP-IDF's Python dependencies",
        ))

# a special "esp-windows-curses" python package is required on Windows for Menuconfig
if "windows" in get_systype():
    import pkg_resources

    if "esp-windows-curses" not in {
            pkg.key
            for pkg in pkg_resources.working_set
    }:
        env.Execute(
            env.VerboseAction(
                '$PYTHONEXE -m pip install "file://%s/tools/kconfig_new/esp-windows-curses" windows-curses'
                % FRAMEWORK_DIR,
        new_path = join(
            dirname(ARDUINO_FRAMEWORK_DIR),
            basename(ARDUINO_FRAMEWORK_DIR).replace("@", "-"),
        )
        rename(ARDUINO_FRAMEWORK_DIR, new_path)
        ARDUINO_FRAMEWORK_DIR = new_path
    assert ARDUINO_FRAMEWORK_DIR and isdir(ARDUINO_FRAMEWORK_DIR)

try:
    import future
    import pyparsing
    import cryptography
except ImportError:
    env.Execute(
        env.VerboseAction(
            '$PYTHONEXE -m pip install "cryptography>=2.1.4" "future>=0.15.2" "pyparsing>=2.0.3,<2.4.0"',
            "Installing ESP-IDF's Python dependencies",
        ))

platform = env.PioPlatform()
board = env.BoardConfig()

FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
assert isdir(FRAMEWORK_DIR)

BUILD_DIR = env.subst("$BUILD_DIR")
CMAKE_API_REPLY_PATH = join(".cmake", "api", "v1", "reply")


def get_project_lib_includes(env):
    project = ProjectAsLibBuilder(env, "$PROJECT_DIR")
Exemple #3
0
env = DefaultEnvironment()
platform = env.PioPlatform()

SDK_DIR = platform.get_package_dir("framework-pulp-sdk")
RT_DIR = os.path.join(SDK_DIR, "runtime", "pulp-rt")
assert os.path.isdir(SDK_DIR)
assert os.path.isdir(RT_DIR)

board_config = env.BoardConfig()

try:
    import prettytable
except ImportError:
    env.Execute(
        env.VerboseAction(
            "$PYTHONEXE -m pip install prettytable",
            "Installing Python dependencies",
        ))


def generate_config(output_dir,
                    configs=None,
                    libs=None,
                    properties=None,
                    extra_args=None):
    if os.path.isfile(os.path.join(env.subst(output_dir), "config.mk")):
        return None
    if not configs:
        configs = []
    if not libs:
        libs = []
Exemple #4
0
import re
import shutil

try:
    from css_html_js_minify import html_minify, js_minify, css_minify
except:
    from SCons.Script import (
        ARGUMENTS,
        COMMAND_LINE_TARGETS,
        DefaultEnvironment,
    )
    env = DefaultEnvironment()

    env.Execute(
        env.VerboseAction(
            '$PYTHONEXE -m pip install "css_html_js_minify" ',
            "Installing Python dependencies",
        )
    )
    try:
        from css_html_js_minify import html_minify, js_minify, css_minify
    except:
        print("WARN: Unable to load minifier")


webroot = "web"
srcroot = "src/web/root"

version = os.environ.get('GITHUB_TAG')
if version == None:
    version = "SNAPSHOT"
Exemple #5
0
from shutil import copyfile
from os import makedirs
from os.path import isdir, isfile, join

from SCons.Script import COMMAND_LINE_TARGETS, DefaultEnvironment

env = DefaultEnvironment()

try:
    import jinja2
    import pyparsing
except ImportError:
    env.Execute(
        env.VerboseAction(
            "$PYTHONEXE -m pip install pyparsing==2.4.5 Jinja2==2.10.1",
            "Installing Freedom E SDK's Python dependencies",
        )
    )

FRAMEWORK_DIR = env.PioPlatform().get_package_dir("framework-freedom-e-sdk")
assert FRAMEWORK_DIR and isdir(FRAMEWORK_DIR)

env.SConscript("_bare.py", exports="env")

board_config = env.BoardConfig()


def is_valid_target(target):
    target_dir = join(FRAMEWORK_DIR, "bsp", target)
    return isdir(target_dir)