Commit graph

5 commits

Author SHA1 Message Date
7fb117a4c4 python-tools.sh: Make __init__py recognize multiple package modules
import my.mod.thing, my.mod.thang wouldn't work, if the modules where not in
the same directory hierarchy, e.g. in $(HOME)/blah/my/mod/thing.py and
$(HOME)/blub/my/mod/thang.py, not even with PYTHONPATH=$(HOME)/blah:$(HOME)/blub.

This commit fixes that.

See https://stackoverflow.com/questions/1675734

Signed-off-by: Jan Lindemann <jan@janware.com>
2020-04-05 12:51:11 +00:00
a935715036 python-tools.sh: Code beautification
This commit beautifies module import path deduction a little. It also adds
(disabled) code for importing submodules, which may or may not be enabled by a
command-line option in the future.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-28 12:20:52 +00:00
ba314df490 python-tools.mk: Fix __init__.py generation
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-25 15:05:21 +00:00
55f9b50562 py-defs.mk, py-mod.mk, python-tools.sh: Improve python module handling
- Fix superflous dots in module names
- Generate PYTHONPATH in projects.py
- Add support for __init__.py.tmpl

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-24 10:59:08 +00:00
9505e9ab40 python-tools.sh: Add python-tools.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-22 14:33:36 +00:00