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>
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>
PGIT_CLONE_CLONE_FROM_USER now supports optional suffixes of the form
[:src-ref[:dst-ref]]. If present, src-ref specifies the remote branch pgit.sh
tries to fetch, and dst-ref the local branch it tries to fetch into. src-ref
defaults to "master" (as it was before) and dst-ref to nothing, i.e. no
head-update of any local branch.
Signed-off-by: Jan Lindemann <jan@janware.com>
If P1 build-needs P2, make it run-need P2, too, since with the current
dependency resolution algorithm, this also adds everything needed to _run_ P2.
Which is the only thing this commit is after. It actually does too much, and
enables P1 to run, too, at least WRT P2. But that's the easiest way to resolve
the problem for now.
Signed-off-by: Jan Lindemann <jan@janware.com>
Staging path by default is debian/tmp, and the packager (dh_install) looks
there and in . for staged files, e.g. ./dist/src/jw-build-1.0.0-93/debian/tmp.
This doesn't match the file system layout as created by jw-build's make
install, which installs to ./dist/src/jw-build-1.0.0-93/debian/tmp/inst-root.
Signed-off-by: Jan Lindemann <jan@janware.com>
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>
git pull, push, fetch use --recurse-submodules, which is non-optional for push.
Added --recurse-submodules=on-demand to all for consistency.
Signed-off-by: Jan Lindemann <jan@janware.com>
Packages that should be ignored altogether with their dependencies can now be
specified with --ignore to various commands using pkg_relations().
Signed-off-by: Jan Lindemann <jan@janware.com>
btools and dspider shared have been moved to git. This commit makes
purge-stale-projects.sh remove the CVS debris and links. Needs to be fetched
before it can work, so make pull will have to run twice in the projects dir. To
be removed after all work trees are in sync.
Signed-off-by: Jan Lindemann <jan@janware.com>
print_pkg_relations() does what pkg_relations() did before: print
the relations. pkg_relations() now only returns them, to be used
by a derived class, for instance
Signed-off-by: Jan Lindemann <jan@janware.com>
--prefix was ignored because the default was set after the commandline options
were evaluated. This commit fixes that.
Signed-off-by: Jan Lindemann <jan@janware.com>
The Projects class wraps all global variables. This is mostly a
text-replace job and results in horrible class design.
Signed-off-by: Jan Lindemann <jan@janware.com>
Rename command requires-pkg to required-os-pkg to avoid confusion with
pkg-reqires. The command could be merged into pkg-requires at a later time.
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>