Background
Currently in [feb25-fix]/configure.py, downloading and installing of each dependency is handled as a bunch of functions. Given that each dependency needs to be downloaded then installed - in other words we have a consistent workflow across dependencies - we can create a class representation of this instead.
Definition of done
Desired Usage
This will enable dependencies to be defined and installed with simple, consistent commmands, e.g.:
# Define wxWidgets dependency.
wx_version: str = '3.2.6' # Use semantic versioning.
wxWidgets: Dependency = Dependency(name='wxWidgets', version='3.2.6', url=f'https://github.com/wxWidgets/wxWidgets/releases/download/v{wx_version}/wxWidgets-{wx_version}.tar.bz2', test_item=f'wxWidgets-{wx_version}')
wxWidgets.download() # Download wxWidgets.
wxWidgets.install() # Install wxWidgets.
Background
Currently in
[feb25-fix]/configure.py, downloading and installing of each dependency is handled as a bunch of functions. Given that each dependency needs to be downloaded then installed - in other words we have a consistent workflow across dependencies - we can create a class representation of this instead.Definition of done
Commandclass that represents a command that can be run. Use a structure similar to Flutter's exampleCommandclass. This can also use aResultinstance to define the result of running theCommand.Dependency] class with the following members:name: str: the dependency's name, e.g.'wxWidgets'.version: str: the version number of the dependency to be installed. Must follow semantic versioning, e.g.'3.2.6'.download_url: str: the URL to download the dependency's source code from.test_item: str: a relative path from the dependency's folder independs(e.g.depends/wxWidgets) to a file or directory whose existence shows that the dependency has already been fully downloaded and installed.download: Command: downloads the dependency to thedepends folder.install: Command: installs the dependency within the correct folder withindepends.Desired Usage
This will enable dependencies to be defined and installed with simple, consistent commmands, e.g.: