diff --git a/environment.yml b/environment.yml index 15e6fda..0ceaa7a 100644 --- a/environment.yml +++ b/environment.yml @@ -4,8 +4,8 @@ channels: - conda-forge dependencies: - - boa - - constructor >=3.3, <4 + - boa >=0.15.1 + - constructor >=3.4.5 - nodejs >18, <19 - python <=3.11 - yaml diff --git a/setup.cfg b/setup.cfg index b2b8d65..304e6cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,8 +21,6 @@ packages = install_requires = jinja2 pyyaml - constructor>=3.4.5 - boa>=0.15.1 traitlets>=5 [options.package_data] diff --git a/src/widgetron/__init__.py b/src/widgetron/__init__.py index 4b51ef6..c56061d 100644 --- a/src/widgetron/__init__.py +++ b/src/widgetron/__init__.py @@ -1 +1 @@ -VERSION = "0.2.4" +VERSION = "0.2.5" diff --git a/src/widgetron/__main__.py b/src/widgetron/__main__.py index 6ccba9a..d85ded1 100644 --- a/src/widgetron/__main__.py +++ b/src/widgetron/__main__.py @@ -192,7 +192,7 @@ def build_conda_package(kwargs) -> int: if (not kwargs["skip_sbom"]) and CONSTRUCTOR_PARAMS.environment_file: create_sbom( CONSTRUCTOR_PARAMS.environment_file, - Path(kwargs["outdir"]) / "conda-sbom.json" + Path(kwargs["outdir"]) / "conda-sbom.json", ) return rc diff --git a/src/widgetron/args.yml b/src/widgetron/args.yml index 75371d4..104cbea 100644 --- a/src/widgetron/args.yml +++ b/src/widgetron/args.yml @@ -243,4 +243,14 @@ default_prefix_all_users: Set default installation prefix for All Users installation. If not provided, the installation prefix for all users installation - will be ${ALLUSERSPROFILE}\${NAME}. Windows only. \ No newline at end of file + will be ${ALLUSERSPROFILE}\${NAME}. Windows only. + +# ELECTRON PARAMS +electron_version: + default: ">=25" + help: | + Version of electron to build for +electron_builder_version: + default: ">=24" + help: | + Version of electron-builder to use \ No newline at end of file diff --git a/src/widgetron/parse_args.py b/src/widgetron/parse_args.py index b79979b..38469af 100644 --- a/src/widgetron/parse_args.py +++ b/src/widgetron/parse_args.py @@ -34,7 +34,6 @@ def config_file(): data["dependencies"] = json.loads(data["dependencies"]) return data - if Path("pyproject.toml").is_file(): _toml = tomllib.load(Path("pyproject.toml").open("rb")) if "tool" in _toml: diff --git a/src/widgetron/templates/electron/package.json_template b/src/widgetron/templates/electron/package.json_template index 7f93b87..da05d48 100644 --- a/src/widgetron/templates/electron/package.json_template +++ b/src/widgetron/templates/electron/package.json_template @@ -24,8 +24,8 @@ }, "devDependencies": { "@cyclonedx/cyclonedx-npm": ">=1.9.2", - "electron": ">=25", - "electron-builder": ">=24" + "electron": "{{electron_version}}", + "electron-builder": "{{electron_builder_version}}" }, "dependencies": { "electron-store": ">=8.1.0" diff --git a/src/widgetron/utils/conda.py b/src/widgetron/utils/conda.py index 0a7ad4a..2c4af8c 100644 --- a/src/widgetron/utils/conda.py +++ b/src/widgetron/utils/conda.py @@ -186,5 +186,18 @@ def explicit_url(package: str, channel: str, with_hash=True, **package_attrs): return pkg["url"] -def create_sbom(lock_file: str|Path, out_file: str|Path): - SHELL.call([JAKE, "sbom", "-f", str(lock_file), "-o", str(out_file), "--output-format", "json", "-t", "CONDA"]) \ No newline at end of file +def create_sbom(lock_file: str | Path, out_file: str | Path): + SHELL.call( + [ + JAKE, + "sbom", + "-f", + str(lock_file), + "-o", + str(out_file), + "--output-format", + "json", + "-t", + "CONDA", + ] + ) diff --git a/src/widgetron/utils/settings.py b/src/widgetron/utils/settings.py index aaf612e..5abca29 100644 --- a/src/widgetron/utils/settings.py +++ b/src/widgetron/utils/settings.py @@ -169,7 +169,7 @@ def _on_env_lock(self, e: T.Bunch) -> None: # Check for local channels for channels_remap lines = [x.strip() for x in content.strip().split("\n")] - urls = lines[lines.index("@EXPLICIT") + 1:] + urls = lines[lines.index("@EXPLICIT") + 1 :] channels = [] for url in urls: for subdir in ["noarch", cc_platform]: