Skip to content

Commit 0857737

Browse files
committed
adds support for arduino-cli 0.25.0
1 parent cc4f4f1 commit 0857737

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
python-version: ${{ matrix.python }}
5454
- name: Download arduino-cli
5555
run: |
56-
wget https://github.com/arduino/arduino-cli/releases/download/0.24.0/arduino-cli_0.24.0_Linux_64bit.tar.gz
57-
tar xzf arduino-cli_0.24.0_Linux_64bit.tar.gz
58-
rm arduino-cli_0.24.0_Linux_64bit.tar.gz
56+
wget https://github.com/arduino/arduino-cli/releases/download/0.25.0/arduino-cli_0.25.0_Linux_64bit.tar.gz
57+
tar xzf arduino-cli_0.25.0_Linux_64bit.tar.gz
58+
rm arduino-cli_0.25.0_Linux_64bit.tar.gz
5959
- name: Install test dependencies
6060
run: |
6161
pip install pytest

pyduinocli/commands/core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def download(self, downloads):
2525
args.extend(CommandBase._strip_args(downloads))
2626
return self._exec(args)
2727

28-
def install(self, installs, run_post_install=None, skip_post_install=None):
28+
def install(self, installs, run_post_install=None, skip_post_install=None, no_overwrite=None):
2929
"""
3030
Calls the :code:`core download` command
3131
@@ -35,6 +35,8 @@ def install(self, installs, run_post_install=None, skip_post_install=None):
3535
:type run_post_install: bool or NoneType
3636
:param skip_post_install: Force skip of post-install scripts
3737
:type skip_post_install: bool or NoneType
38+
:param no_overwrite: Do not overwrite already installed platforms
39+
:type no_overwrite: bool or NoneType
3840
:return: The output of the related command
3941
:rtype: dict
4042
"""
@@ -44,6 +46,8 @@ def install(self, installs, run_post_install=None, skip_post_install=None):
4446
args.append(flags.RUN_POST_INSTALL)
4547
if skip_post_install is True:
4648
args.append(flags.SKIP_POST_INSTALL)
49+
if no_overwrite is True:
50+
args.append(flags.NO_OVERWRITE)
4751
return self._exec(args)
4852

4953
def list(self, updatable=None, all=None):

pyduinocli/commands/lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def download(self, downloads):
3636
args.extend(CommandBase._strip_args(downloads))
3737
return self._exec(args)
3838

39-
def install(self, libraries=None, git_urls=None, zip_paths=None):
39+
def install(self, libraries=None, git_urls=None, zip_paths=None, no_overwrite=None):
4040
"""
4141
Calls the :code:`lib install` command
4242
@@ -46,6 +46,8 @@ def install(self, libraries=None, git_urls=None, zip_paths=None):
4646
:type git_urls: list or NoneType
4747
:param zip_paths: A list of paths to zip files to install
4848
:type zip_paths: list or NoneType
49+
:param no_overwrite: Do not overwrite already installed libraries.
50+
:type no_overwrite: bool or NoneType
4951
:return: The output of the related command
5052
:rtype: dict
5153
"""
@@ -58,6 +60,8 @@ def install(self, libraries=None, git_urls=None, zip_paths=None):
5860
if zip_paths:
5961
args.append(flags.ZIP_PATH)
6062
args.extend(CommandBase._strip_args(zip_paths))
63+
if no_overwrite is True:
64+
args.append(flags.NO_OVERWRITE)
6165
return self._exec(args)
6266

6367
def list(self, all=None, updatable=None, fqbn=None, board_options=None):

pyduinocli/constants/flags.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@
6262
DEBUG_FILE = '--debug-file'
6363
DUMP_PROFILE = '--dump-profile'
6464
PROFILE = '--profile'
65+
NO_OVERWRITE = '--no-overwrite'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def get_long_description():
88

99
setuptools.setup(
1010
name="pyduinocli",
11-
version="0.23.0",
11+
version="0.25.0",
1212
author="Renaud Gaspard",
1313
author_email="gaspardrenaud@hotmail.com",
1414
description="Wrapper library around arduino-cli",

0 commit comments

Comments
 (0)