diff options
author | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-08-09 21:49:16 +0900 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-08-10 10:26:49 +0000 |
commit | c38036d736a2174c8f6391e32d46520c5b5c628b (patch) | |
tree | 3f37a7831da79753aff7add831789aab3783c3c2 /setup.py | |
parent | e3cb8b5b0a33c4b0c5333ea714d4722daba0c248 (diff) | |
download | buildstream-c38036d736a2174c8f6391e32d46520c5b5c628b.tar.gz |
_loader: Use only one Dependency() class
This moves the Dependency() implementation from the _loader.types
module into the _loader.loadelement module, replacing the duplicate
Dependency() definition there.
Instead of creating _loader.loadelement.Dependency objects on the
fly during the load process, we simply fill in the new LoadElement
member on the original Dependency objects.
This refactor should make the code easier to work with, since any
originally loaded state from the YAML is preserved in the intermediate
LoadElement data model and does not need to be manually handed over
to a separate object.
Summary of changes:
* _loader/types.pyx: Removed Dependency() implementation from here,
and renamed to _loader/types.py
* _loader/loadelement.py: Replaced the second Dependency object
implementation with the original one from _loader/types.py,
adding a new LoadElement member which is resolved during the
load process via the new Dependency.set_element() API
* _loader/loader.py: Instead of creating a second kind of Dependency
object on the fly during the load process, simply resolve the
existing dependencies with Dependency.set_element()
* setup.py: Fixed up cython build instructions, now that _loader/types.py
no longer contains any cython code.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -304,8 +304,7 @@ BUILD_EXTENSIONS = [] register_cython_module("buildstream.node") register_cython_module("buildstream._loader._loader") -register_cython_module("buildstream._loader.loadelement") -register_cython_module("buildstream._loader.types", dependencies=["buildstream.node"]) +register_cython_module("buildstream._loader.loadelement", dependencies=["buildstream.node"]) register_cython_module("buildstream._yaml", dependencies=["buildstream.node"]) register_cython_module("buildstream._types") register_cython_module("buildstream._utils") |