Commit graph

206 commits

Author SHA1 Message Date
a85f0929c6 Consistently replace def run() by async def run()
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-12-20 08:41:58 +01:00
8a74e030dc Add python-termcolor to package deps
Also fix package group (Development/Libraries/Python).

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-12-07 20:13:08 +01:00
89b4b5c05d Release 1.0.0-8@ubuntu-18.04/amd64
Signed-off-by: janware DevOps <devops@janware.com>
2019-12-07 15:18:45 +00:00
13b58c2fa0 Change license from proprietary to LGPLv2
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-12-07 14:13:48 +00:00
d3faa8ee85 log.py: Add utilities, better list-support in slog_m()
- Add functions: append_to_prefix(),
  remove_from_prefix() set_filename_length()
- Make slog_m() log one list item per line
- Add console_color_chars(prio)

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-30 15:46:26 +01:00
c96ffe52c0 Add Process and Signals support
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-29 11:25:03 +01:00
6123a68195 Cmds.py: Run all commands in asyncio event loop
This commit makee Cmds run all sub-commands in an asyncio event loop.
The event loop is currently passed to the commands, which seems
unnecessary and looks like it's using a feature which is bound to be
deprecated in the future.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-28 13:12:18 +01:00
036a978130 log.py: Add slog_m() (multiline logging)
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-28 12:50:17 +01:00
1cdb38b767 log.py: Make some variables private
Add leading underscore to variables that should not be visible
outside of log.py. Also do some indentation beautification.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-28 10:59:20 +01:00
ddfb500fa2 Add misc.object_builtin_name()
object_builtin_name() is meant to derive an object name from its
class name. Doesn't work well, but adding the code nonetheless for
improving it later.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-24 18:45:05 +02:00
1f122fae82 Rename the MODDIR makefile variable to JWBDIR
Rename the omnipresent MODDIR variable to JWBDIR, since that's more to the
point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 23:32:20 +02:00
20baf30f03 Release 1.0.0-8@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-26 17:44:56 +00:00
dd23bc8737 Start version: 1.0.0-8
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-26 17:44:41 +00:00
8d72fabe28 $(TOPDIR)/make: Beautify makefile indendation
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-25 22:56:59 +02:00
9a78398202 Rename variable PROJECTS_DIR to DEV_PROJECTS_DIR in proj.mk
PROJECTS_DIR is a final version of where the projects to be compiled against
are. DEV_PROJECTS_DIR is merely a candidate, used in proj.mk, currently only
there.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-25 21:15:32 +02:00
e6e64d09fd proj.mk: Allow MODDIR to be overridden from the environment
Make the MODDIR definition in proj.mk depend on the environment:
- Change "=" assignment to "?="
- Prepend $(BUILD_TOOLS_PREFIX) to /opt/jw-build

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-19 13:18:54 +02:00
79ce30cec6 Release 1.0.0-7@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-04 10:41:56 +00:00
7158232efe Start version: 1.0.0-7
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-04 10:41:40 +00:00
c606d53ee8 Merge branch 'master' of ssh://git.jannet.de/srv/git/jan/proj/jw-python
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-04 12:32:17 +02:00
2e543e9cfe Release 1.0.0-6@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-03 09:11:36 +00:00
4471ddfd0f Add forgotten jwutils/CppState.py
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-03 10:00:04 +02:00
2f08b439f5 Start version: 1.0.0-6
Signed-off-by: janware DevOps <devops@janware.com>
2019-06-03 07:34:14 +00:00
faa85f7c69 Flip some more switches from pathon 2 to 3 (untested!)
This commit flips some more switches from Python 2 to Python 3 in makefiles and
Python code. Build runs through, but it's still likely to break things.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-02 14:28:47 +02:00
b9ff70c613 Release 1.0.0-5@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2019-05-30 13:04:34 +00:00
df6a97c754 Start version: 1.0.0-5
Signed-off-by: janware DevOps <devops@janware.com>
2019-05-30 13:04:20 +00:00
1c0c5ab884 Attempt to support parsing full lines into StringTree
This commit tries to add support for the

  [section]
  first line
  second line

syntax, i.e. non-assignments, without equal sign. Half-baked, but
still better than before. Also support some more Python 3, i.e.
dict.items() instead of iteritems()

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-05-19 13:15:27 +00:00
109179b55e process-text-files.py mk-indent: Add support for left-pad-match
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-17 17:25:17 +01:00
7ac9cd7a69 Add command cpp-fix-include-guard
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-16 11:37:20 +01:00
102d0c3830 process-text-files.py: Name commands more consistently
Commands now start with their target audience (cpp- or mk-).
Some code cleanup along the way.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-16 09:08:10 +01:00
a676ff5cdf process-text-files.py: Implement command indent-cpp-macros
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-15 20:05:48 +01:00
6dd594d47b Fix multiple Python 3 compatibility issues
Changes in Python 3 that made the code choke:

  o basestring is merged into str
  o print() needs parentesis
  o Class inheritance syntax changed
  o Abstract baseclass (ABCMeta) syntax changed
  o map.iteritems() is replaced by map.items()
  o Inconsistent use of tabs and spaces are no longer tolerated

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-10 16:38:59 +01:00
6eaad195a8 Fix padding after equal sign in makefiles
Padding should be done only if RHS is not empty.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 13:38:42 +01:00
586f31d06c process-text-files.py: Add command cleanup-spaces
The command removes traling empty spaces from lines and trailing empty lines
from files.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-04 21:18:13 +01:00
a4b447375a process-text-files.py: Add command indent-makefiles
The command is intended to reformat makefiles in a general fashion.
It currently only vertically aligns equal signs in makefiles.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 17:11:57 +01:00
0cb09081eb process-text-files.py: Slightly beautify help message
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-01 14:10:16 +01:00
70117f9d34 Fix most brutal breakages introduced by commit 974a567
The cleanup commit 974a567 added some stub namespace-addition code to
project-text-files.py, which was never completed, but which broke all
other functionality of project-text-files.py. This commit doesn't
complete the implementation, but restores its previous functionality.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-01 13:57:51 +01:00
101bad0617 $(MODDIR)/make/defs.mk: Set HDRDIR_SCOPE_PREFIX = $(PROJECT)
Set HDRDIR_SCOPE_PREFIX = $(PROJECT) by default.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 17:40:39 +01:00
9baf68baa4 Rename LAST_RPM_VERSION to RELEASES
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 12:07:11 +01:00
bfa30d5d20 Rename CVS_PROJ_DIR to PROJECTS_DIR
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 11:42:57 +01:00
754b27af0b Release 1.0.0-4@centos-7/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2018-12-14 15:13:54 +01:00
fd125f07fe Add class Cmds
run_sub_commands() was the only way to access subcommands up to now,
Cmds.run() adds another interface, an object as a place to add
customizations affecting all commands, e.g. global command line
options.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-11 14:10:01 +01:00
4b7dad4b6b Release 1.0.0-4@suse-tumbleweed/x86_64
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-01 15:52:44 +01:00
f0aad9afaf Start version: 1.0.0-4
Signed-off-by: janware DevOps <devops@janware.com>
2018-12-01 15:46:02 +01:00
7081768a5a Release 1.0.0-3@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2018-10-25 11:12:03 +02:00
8c768f6d59 Start version: 1.0.0-3
Signed-off-by: janware DevOps <devops@janware.com>
2018-10-25 11:10:19 +02:00
974a56793a project-text-files.py: Add CmdAddCppNamespace
This is an old patch, tackling namespace addition. Not finished, just
a cleanup commit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-10-24 18:50:44 +02:00
e1974118b5 process-text-files.py: Fix file name matching
For some unbeknown reason, file names were compared case-invariantly
before deciding upon renaming them.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-03-16 15:02:09 +01:00
fc5241a2e8 Now excplicitly calling python2 executable instead of python
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-01-02 13:09:06 +00:00
3ea89a7812 Explicitly set python version in hashbang
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-29 22:26:06 +01:00
0014310353 Release 1.0.0-2@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2017-12-26 23:25:19 +01:00