The current globbing pattern for filling the PYTHON variable doesn't
account for the fact that /usr/bin/python3.X might have more than one
digit for X, fix that
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit adds support for static typechecking with mypy.
Notable additions:
- A new target "check" which does the type checking
- Py-mods.mk, meant to be included from a directory containing python modules
in subdirectories, but not being a python module itself. It makes the all
target depend on check only if PY_RUN_CHECK_AFTER_BUILD is defined and
true. That's because pypy is under heavy development, and the Ubuntu 18.04
version is too old to work for lots of the code.
Signed-off-by: Jan Lindemann <jan@janware.com>
This allows to specify modules in a test directory which a given module does
_not_ depend on and doesn't want to depend on.
Signed-off-by: Jan Lindemann <jan@janware.com>
PY_SITE_PACKAGES_PATH is set to the first element site.getsitepackages(), which
(correctly, but in this case undesirably) is below /usr/local. Use the first
path which is not.
Signed-off-by: Jan Lindemann <jan@janware.com>
Predefined PY_INSTALL_DIR was ignored prior to this commit, which shuffles the
py-defs.mk variables around considerably. Still some temporary variables
unnecessarily defined with ?=, but some testing would be good prior to further
changes.
Signed-off-by: Jan Lindemann <jan@janware.com>
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>
- 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>