summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-17 20:56:30 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-04-17 15:55:01 +0000
commitfb6687b6e87284cbb93b576f19ff629aa233533e (patch)
tree7be45677fde311f76102ef5efd5a5a75311e028c
parent78a86f60102a34cba0045d6c02de7a31aad4874f (diff)
downloadbuildstream-fb6687b6e87284cbb93b576f19ff629aa233533e.tar.gz
_loader package: Creating a new sub package to hold the loader related things.
-rw-r--r--buildstream/_loader/__init__.py23
-rw-r--r--buildstream/_loader/loader.py (renamed from buildstream/_loader.py)19
-rw-r--r--buildstream/_loader/metaelement.py (renamed from buildstream/_metaelement.py)0
-rw-r--r--buildstream/_loader/metasource.py (renamed from buildstream/_metasource.py)0
-rw-r--r--tests/loader/basics.py3
-rw-r--r--tests/loader/dependencies.py3
6 files changed, 35 insertions, 13 deletions
diff --git a/buildstream/_loader/__init__.py b/buildstream/_loader/__init__.py
new file mode 100644
index 000000000..dbc89ba83
--- /dev/null
+++ b/buildstream/_loader/__init__.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2018 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library. If not, see <http://www.gnu.org/licenses/>.
+#
+# Authors:
+# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
+
+from .metasource import MetaSource
+from .metaelement import MetaElement
+from .loader import Loader
diff --git a/buildstream/_loader.py b/buildstream/_loader/loader.py
index 862302679..245d43d3f 100644
--- a/buildstream/_loader.py
+++ b/buildstream/_loader/loader.py
@@ -24,15 +24,16 @@ from collections import Mapping, namedtuple
import tempfile
import shutil
-from ._exceptions import LoadError, LoadErrorReason
-from . import Consistency
-from ._project import Project
-from . import _yaml
-from .element import Element
-from ._metaelement import MetaElement
-from ._metasource import MetaSource
-from ._profile import Topics, profile_start, profile_end
-from ._platform import Platform
+from .._exceptions import LoadError, LoadErrorReason
+from .. import Consistency
+from .._project import Project
+from .. import _yaml
+from ..element import Element
+from .._profile import Topics, profile_start, profile_end
+from .._platform import Platform
+
+from . import MetaElement
+from . import MetaSource
#################################################
diff --git a/buildstream/_metaelement.py b/buildstream/_loader/metaelement.py
index 7ba6ed0ed..7ba6ed0ed 100644
--- a/buildstream/_metaelement.py
+++ b/buildstream/_loader/metaelement.py
diff --git a/buildstream/_metasource.py b/buildstream/_loader/metasource.py
index 5f3fa3608..5f3fa3608 100644
--- a/buildstream/_metasource.py
+++ b/buildstream/_loader/metasource.py
diff --git a/tests/loader/basics.py b/tests/loader/basics.py
index 9c526a27b..008750f70 100644
--- a/tests/loader/basics.py
+++ b/tests/loader/basics.py
@@ -2,8 +2,7 @@ import os
import pytest
from buildstream._exceptions import LoadError, LoadErrorReason
-from buildstream._loader import Loader
-from buildstream._metaelement import MetaElement
+from buildstream._loader import Loader, MetaElement
from . import make_loader
DATA_DIR = os.path.join(
diff --git a/tests/loader/dependencies.py b/tests/loader/dependencies.py
index c8fa1b629..0816e3cfb 100644
--- a/tests/loader/dependencies.py
+++ b/tests/loader/dependencies.py
@@ -2,8 +2,7 @@ import os
import pytest
from buildstream._exceptions import LoadError, LoadErrorReason
-from buildstream._loader import Loader
-from buildstream._metaelement import MetaElement
+from buildstream._loader import Loader, MetaElement
from . import make_loader
DATA_DIR = os.path.join(