mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 10:37:13 +02:00
Drop support for Python 2
This commit is contained in:
2
.github/workflows/examples.yml
vendored
2
.github/workflows/examples.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-16.04, windows-latest, macos-latest]
|
||||
python-version: [2.7, 3.7]
|
||||
python-version: [3.7]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -40,6 +40,8 @@ from platformio.proc import is_container
|
||||
|
||||
|
||||
def on_platformio_start(ctx, force, caller):
|
||||
ensure_python3(raise_exception=True)
|
||||
|
||||
app.set_session_var("command_ctx", ctx)
|
||||
app.set_session_var("force_option", force)
|
||||
set_caller(caller)
|
||||
@ -47,24 +49,8 @@ def on_platformio_start(ctx, force, caller):
|
||||
|
||||
if PlatformioCLI.in_silence():
|
||||
return
|
||||
|
||||
after_upgrade(ctx)
|
||||
|
||||
if not ensure_python3(raise_exception=False):
|
||||
click.secho(
|
||||
"""
|
||||
Python 2 and Python 3.5 are not compatible with PlatformIO Core 5.0.
|
||||
Please check a migration guide on how to fix this warning message:
|
||||
""",
|
||||
fg="yellow",
|
||||
)
|
||||
click.secho(
|
||||
"https://docs.platformio.org/en/latest/core/migration.html"
|
||||
"#drop-support-for-python-2-and-3-5",
|
||||
fg="blue",
|
||||
)
|
||||
click.echo("")
|
||||
|
||||
|
||||
def on_platformio_end(ctx, result): # pylint: disable=unused-argument
|
||||
if PlatformioCLI.in_silence():
|
||||
|
4
setup.py
4
setup.py
@ -58,9 +58,6 @@ setup(
|
||||
author_email=__email__,
|
||||
url=__url__,
|
||||
license=__license__,
|
||||
python_requires=", ".join(
|
||||
[">=2.7", "!=3.0.*", "!=3.1.*", "!=3.2.*", "!=3.3.*", "!=3.4.*"]
|
||||
),
|
||||
install_requires=minimal_requirements + ([] if PY2 else home_requirements),
|
||||
packages=find_packages(exclude=["tests.*", "tests"]) + ["scripts"],
|
||||
package_data={
|
||||
@ -87,7 +84,6 @@ setup(
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: C",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Software Development",
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
|
Reference in New Issue
Block a user