mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
YAPF 0.26.0
This commit is contained in:
@ -185,8 +185,8 @@ class LibBuilderBase(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def build_dir(self):
|
def build_dir(self):
|
||||||
lib_hash = hashlib.sha1(self.path if util.PY2 else self.path.
|
lib_hash = hashlib.sha1(
|
||||||
encode()).hexdigest()[:3]
|
self.path if util.PY2 else self.path.encode()).hexdigest()[:3]
|
||||||
return join("$BUILD_DIR", "lib%s" % lib_hash, basename(self.path))
|
return join("$BUILD_DIR", "lib%s" % lib_hash, basename(self.path))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -365,8 +365,8 @@ def platform_update(platforms, only_packages, only_check, json_output):
|
|||||||
if not pkg_dir:
|
if not pkg_dir:
|
||||||
continue
|
continue
|
||||||
latest = pm.outdated(pkg_dir, requirements)
|
latest = pm.outdated(pkg_dir, requirements)
|
||||||
if (not latest and not PlatformFactory.newPlatform(pkg_dir).
|
if (not latest and not PlatformFactory.newPlatform(
|
||||||
are_outdated_packages()):
|
pkg_dir).are_outdated_packages()):
|
||||||
continue
|
continue
|
||||||
data = _get_installed_platform_data(
|
data = _get_installed_platform_data(
|
||||||
pkg_dir, with_boards=False, expose_packages=False)
|
pkg_dir, with_boards=False, expose_packages=False)
|
||||||
|
@ -432,5 +432,5 @@ def calculate_project_hash():
|
|||||||
# Fix issue with useless project rebuilding for case insensitive FS.
|
# Fix issue with useless project rebuilding for case insensitive FS.
|
||||||
# A case of disk drive can differ...
|
# A case of disk drive can differ...
|
||||||
chunks_to_str = chunks_to_str.lower()
|
chunks_to_str = chunks_to_str.lower()
|
||||||
return sha1(chunks_to_str if util.PY2 else chunks_to_str.
|
return sha1(
|
||||||
encode()).hexdigest()
|
chunks_to_str if util.PY2 else chunks_to_str.encode()).hexdigest()
|
||||||
|
@ -589,8 +589,8 @@ class PkgInstallerMixin(object):
|
|||||||
target_dirname = "%s@src-%s" % (
|
target_dirname = "%s@src-%s" % (
|
||||||
pkg_dirname,
|
pkg_dirname,
|
||||||
hashlib.md5(cur_manifest['__src_url'] if util.
|
hashlib.md5(cur_manifest['__src_url'] if util.
|
||||||
PY2 else cur_manifest['__src_url'].
|
PY2 else cur_manifest['__src_url'].encode(
|
||||||
encode()).hexdigest())
|
)).hexdigest())
|
||||||
shutil.move(pkg_dir, join(self.package_dir, target_dirname))
|
shutil.move(pkg_dir, join(self.package_dir, target_dirname))
|
||||||
# fix to a version
|
# fix to a version
|
||||||
elif action == 2:
|
elif action == 2:
|
||||||
@ -600,8 +600,8 @@ class PkgInstallerMixin(object):
|
|||||||
target_dirname = "%s@src-%s" % (
|
target_dirname = "%s@src-%s" % (
|
||||||
pkg_dirname,
|
pkg_dirname,
|
||||||
hashlib.md5(tmp_manifest['__src_url'] if util.
|
hashlib.md5(tmp_manifest['__src_url'] if util.
|
||||||
PY2 else tmp_manifest['__src_url'].
|
PY2 else tmp_manifest['__src_url'].encode(
|
||||||
encode()).hexdigest())
|
)).hexdigest())
|
||||||
pkg_dir = join(self.package_dir, target_dirname)
|
pkg_dir = join(self.package_dir, target_dirname)
|
||||||
|
|
||||||
# remove previous/not-satisfied package
|
# remove previous/not-satisfied package
|
||||||
|
@ -642,10 +642,8 @@ class PlatformBase( # pylint: disable=too-many-public-methods
|
|||||||
if not isdir(libcore_dir):
|
if not isdir(libcore_dir):
|
||||||
continue
|
continue
|
||||||
storages.append({
|
storages.append({
|
||||||
"name":
|
"name": "%s-core-%s" % (opts['package'], item),
|
||||||
"%s-core-%s" % (opts['package'], item),
|
"path": libcore_dir
|
||||||
"path":
|
|
||||||
libcore_dir
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return storages
|
return storages
|
||||||
|
Reference in New Issue
Block a user