Bug 1443204 - Pre: Clean-up unused Android data structures in mozbuild frontend. r=chmanchester

MozReview-Commit-ID: 5ympxk0jSJq

--HG--
extra : rebase_source : cc368d42eed182cc595858effd08517c6ec25168
This commit is contained in:
Nick Alexander 2018-03-06 14:53:04 -08:00
Родитель 9ceadd71bb
Коммит 713d88d96a
4 изменённых файлов: 10 добавлений и 71 удалений

Просмотреть файл

@ -29,10 +29,6 @@ from mozbuild.frontend.context import (
)
from .common import CommonBackend
from ..frontend.data import (
AndroidAssetsDirs,
AndroidResDirs,
AndroidExtraResDirs,
AndroidExtraPackages,
BaseLibrary,
BaseProgram,
ChromeManifestEntry,

Просмотреть файл

@ -1133,59 +1133,6 @@ class GeneratedFile(ContextDerived):
self.required_for_compile = any(f.endswith(suffixes) for f in self.outputs)
class AndroidResDirs(ContextDerived):
"""Represents Android resource directories."""
__slots__ = (
'paths',
)
def __init__(self, context, paths):
ContextDerived.__init__(self, context)
self.paths = paths
class AndroidAssetsDirs(ContextDerived):
"""Represents Android assets directories."""
__slots__ = (
'paths',
)
def __init__(self, context, paths):
ContextDerived.__init__(self, context)
self.paths = paths
class AndroidExtraResDirs(ContextDerived):
"""Represents Android extra resource directories.
Extra resources are resources provided by libraries and including in a
packaged APK, but not otherwise redistributed. In practice, this means
resources included in Fennec but not in GeckoView.
"""
__slots__ = (
'paths',
)
def __init__(self, context, paths):
ContextDerived.__init__(self, context)
self.paths = paths
class AndroidExtraPackages(ContextDerived):
"""Represents Android extra packages."""
__slots__ = (
'packages',
)
def __init__(self, context, packages):
ContextDerived.__init__(self, context)
self.packages = packages
class ChromeManifestEntry(ContextDerived):
"""Represents a chrome.manifest entry."""

Просмотреть файл

@ -23,10 +23,6 @@ import mozinfo
import pytoml
from .data import (
AndroidAssetsDirs,
AndroidExtraPackages,
AndroidExtraResDirs,
AndroidResDirs,
BaseRustProgram,
BaseSources,
ChromeManifestEntry,
@ -1380,18 +1376,19 @@ class TreeMetadataEmitter(LoggingMixin):
raise SandboxValidationError(
'Script for generating %s does not end in .py: %s'
% (f, script), context)
for i in flags.inputs:
p = Path(context, i)
if (isinstance(p, SourcePath) and
not os.path.exists(p.full_path)):
raise SandboxValidationError(
'Input for generating %s does not exist: %s'
% (f, p.full_path), context)
inputs.append(p)
else:
script = None
method = None
for i in flags.inputs:
p = Path(context, i)
if (isinstance(p, SourcePath) and
not os.path.exists(p.full_path)):
raise SandboxValidationError(
'Input for generating %s does not exist: %s'
% (f, p.full_path), context)
inputs.append(p)
yield GeneratedFile(context, script, method, outputs, inputs,
flags.flags, localized=localized)

Просмотреть файл

@ -14,7 +14,6 @@ from mozbuild.frontend.context import (
Path,
)
from mozbuild.frontend.data import (
AndroidResDirs,
ChromeManifestEntry,
ComputedFlags,
ConfigFileSubstitution,