13 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b5ab0a3d26 | |||
| 9f15868dd4 | |||
| bc2033490f | |||
| a863bb9747 | |||
| 75820eee7c | |||
| 0cd5ffa378 | |||
| ded9588396 | |||
| 2a67708fb1 | |||
| 31537a0bd6 | |||
| 3370dd6236 | |||
| ac583f76e1 | |||
| 17bf98cb7a | |||
| aa3e2efd84 |
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| b5ab0a3d26 |
build.lib.SSHClient: Add module
SSHClient(hostname) is an abstract class for SSH / SCP operations. It comes with two implementations, SSHClientInternal an SSHClientCmd. The former needs paramiko installed, which might be a reason to fail on unprepared systems, the latter is slower and more limited. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 9f15868dd4 |
build.lib.utils: Add module
Add some utility functions, namely: run_cmd(cmd: list[str], wd=None, throw=True, verbose=False) -> str|None run_curl(args: list[str], parse_json: bool=True) -> dict|str get_username(args: Namespace|None=None, url: str|None=None) -> str get_password(args: Namespace|None=None, url: str|None=None, askpass_env: list[str]=[]) -> str Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| bc2033490f |
jw.build.lib: Add module
Add jw.build.lib as a location for generic utility modules. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| a863bb9747 |
jw.build.App: Unroll run_from_cmd_module()
run_from_cmd_module() is a helper function used to allow command selection alongside the legacy and now obsolete method. Unrolling it is a step towards adding proper argparse subparsers, so do that. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 75820eee7c |
jw.build.App: Fix commands missing from help message
jw-projects.py --help doesn't list the commands, fix that. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 0cd5ffa378 |
jw.__init__.py: Add empty file
Make $(TOPDIR)/src/python/jw a module. Needed since $(TOPDIR/make now also runs jw-python.py. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| ded9588396 |
jw.build: Disable generation of __init__.py
The default behaviour of a generated __init__.py is to load all exported symbols in the respective directory. Since jw-python.py is invoked often, this hampers performance, so disable it. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 2a67708fb1 |
build.cmds.BaseCmdPkgRelations: Add Module
For requires, provides and conflicts, isolate the bulk of the code in BaseCmdPkgRelations, then derive CmdPkgConflicts, CmdPkgProvides and CmdPkgRequires from that class. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 31537a0bd6 |
build.cmds.CmdCreatePkgConfig: Add module
Implement the functionality of create-pkg-config.sh in a Python module CmdCreatePkgConfig.py. This allows to remove create-pkg-config.sh and jw-build-functions.sh. Note that the translation was done pretty literally to play it safe. More code can and should be removed by taking advantage of the fact that jw-projects.py knows more about the project than the shell scripts. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 3370dd6236 |
build.App: Remove some cruft
Remove code - Explicitly marked as unused
- Meant to provide Python2 compatibility
- Meant to run App.py as main module
- Turned obsolete by removing the command functions from
Projects.py Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| ac583f76e1 |
build.cmds: Move build.App.cmd_xxx() here
For every cmd_xxx() method in build.App, create a class that's instatiated for running the respective command. This has the advantage of making App.py smaller (and faster), and having smaller, more maintainable command modules adhering to a common interface. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 17bf98cb7a |
build.Cmd: Add module
Cmd is meant as a base class for classes representing commands currently still implemented as methods of the Project class. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| aa3e2efd84 |
projects.py: Move bulk of code into module
Move nearly all of projects.py into src/python/jw/build/App.py. The plan is to split the script into parts and import them. Signed-off-by: Jan Lindemann <jan@janware.com> |