mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Remove obsolate code
This commit is contained in:
@ -123,8 +123,6 @@ def cli(
|
|||||||
fg="yellow",
|
fg="yellow",
|
||||||
)
|
)
|
||||||
|
|
||||||
handle_legacy_libdeps(project_dir, config)
|
|
||||||
|
|
||||||
default_envs = config.default_envs()
|
default_envs = config.default_envs()
|
||||||
results = []
|
results = []
|
||||||
for env in config.envs():
|
for env in config.envs():
|
||||||
|
@ -15,33 +15,10 @@
|
|||||||
from os import makedirs
|
from os import makedirs
|
||||||
from os.path import isdir, isfile, join
|
from os.path import isdir, isfile, join
|
||||||
|
|
||||||
import click
|
|
||||||
|
|
||||||
from platformio import fs
|
from platformio import fs
|
||||||
from platformio.project.helpers import compute_project_checksum, get_project_dir
|
from platformio.project.helpers import compute_project_checksum, get_project_dir
|
||||||
|
|
||||||
|
|
||||||
def handle_legacy_libdeps(project_dir, config):
|
|
||||||
legacy_libdeps_dir = join(project_dir, ".piolibdeps")
|
|
||||||
if not isdir(legacy_libdeps_dir) or legacy_libdeps_dir == config.get(
|
|
||||||
"platformio", "libdeps_dir"
|
|
||||||
):
|
|
||||||
return
|
|
||||||
if not config.has_section("env"):
|
|
||||||
config.add_section("env")
|
|
||||||
lib_extra_dirs = config.get("env", "lib_extra_dirs", [])
|
|
||||||
lib_extra_dirs.append(legacy_libdeps_dir)
|
|
||||||
config.set("env", "lib_extra_dirs", lib_extra_dirs)
|
|
||||||
click.secho(
|
|
||||||
"DEPRECATED! A legacy library storage `{0}` has been found in a "
|
|
||||||
"project. \nPlease declare project dependencies in `platformio.ini`"
|
|
||||||
" file using `lib_deps` option and remove `{0}` folder."
|
|
||||||
"\nMore details -> https://docs.platformio.org/page/projectconf/"
|
|
||||||
"section_env_library.html#lib-deps".format(legacy_libdeps_dir),
|
|
||||||
fg="yellow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def clean_build_dir(build_dir, config):
|
def clean_build_dir(build_dir, config):
|
||||||
# remove legacy ".pioenvs" folder
|
# remove legacy ".pioenvs" folder
|
||||||
legacy_build_dir = join(get_project_dir(), ".pioenvs")
|
legacy_build_dir = join(get_project_dir(), ".pioenvs")
|
||||||
|
Reference in New Issue
Block a user