Skip to content

Commit 1bdb495

Browse files
committed
Merge branch 'release/v0.3.5'
2 parents 321f265 + d0679f9 commit 1bdb495

File tree

6 files changed

+43
-7
lines changed

6 files changed

+43
-7
lines changed

.github/stale.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 30
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- bug
8+
- known issue
9+
- feature
10+
- enhancement
11+
# Label to use when marking an issue as stale
12+
staleLabel: stale
13+
# Comment to post when marking an issue as stale. Set to `false` to disable
14+
markComment: >
15+
This issue has been automatically marked as stale because it has not had
16+
recent activity. Please provide more details or it will be closed if no
17+
further activity occurs. Thank you for your contributions.
18+
# Comment to post when closing a stale issue. Set to `false` to disable
19+
closeComment: false

.pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ disable=
1313
bad-continuation,
1414
fixme,
1515
arguments-differ,
16-
useless-object-inheritance
16+
useless-object-inheritance,
17+
super-with-arguments,
18+
raise-missing-from

get-platformio.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pioinstaller/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import logging.config
1616

17-
VERSION = (0, 3, 4)
17+
VERSION = (0, 3, 5)
1818
__version__ = ".".join([str(s) for s in VERSION])
1919

2020
__title__ = "platformio-installer"

pioinstaller/python.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import platform
1919
import subprocess
2020
import sys
21+
import tempfile
2122

2223
import click
2324

@@ -113,6 +114,12 @@ def check():
113114
except ImportError:
114115
raise exception.DistutilsNotFound()
115116

117+
# portable Python 3 for macOS is not compatible with macOS < 10.13
118+
# https://github.com/platformio/platformio-core-installer/issues/70
119+
if util.IS_MACOS and sys.version_info >= (3, 5):
120+
with tempfile.NamedTemporaryFile() as tmpfile:
121+
os.utime(tmpfile.name)
122+
116123
if not util.IS_WINDOWS:
117124
return True
118125

@@ -135,7 +142,7 @@ def check():
135142
return True
136143

137144

138-
def find_compatible_pythons(ignore_pythons=None):
145+
def find_compatible_pythons(ignore_pythons=None): # pylint: disable=too-many-branches
139146
ignore_list = []
140147
for p in ignore_pythons or []:
141148
ignore_list.extend(glob.glob(p))
@@ -171,9 +178,17 @@ def find_compatible_pythons(ignore_pythons=None):
171178
stderr=subprocess.STDOUT,
172179
)
173180
result.append(item)
174-
log.debug(output.decode().strip())
181+
try:
182+
log.debug(output.decode().strip())
183+
except UnicodeDecodeError:
184+
pass
175185
except subprocess.CalledProcessError as e: # pylint:disable=bare-except
176-
error = e.output.decode()
186+
try:
187+
error = e.output.decode()
188+
log.debug(error)
189+
except UnicodeDecodeError:
190+
pass
191+
error = error or ""
177192
if "Could not find distutils module" in error:
178193
# pylint:disable=line-too-long
179194
raise click.ClickException(
@@ -184,5 +199,4 @@ def find_compatible_pythons(ignore_pythons=None):
184199
185200
(MAY require administrator access `sudo`)""",
186201
)
187-
log.debug(error)
188202
return result

pioinstaller/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import requests
2626

2727
IS_WINDOWS = sys.platform.lower().startswith("win")
28+
IS_MACOS = sys.platform.lower() == "darwin"
2829

2930
log = logging.getLogger(__name__)
3031

0 commit comments

Comments
 (0)