60ef137bc3
projects.mk, py-defs.mk, py-version.mk: Add py-version.mk
...
This commit adds py-version.mk, eliminating redundancy between projects.mk and py-defs.mk in setting up the Python version early.
2025-02-22 09:04:17 +00:00
9a5bc11cd0
py-defs.mk: Fix: mypy finds modules unter multiple paths
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2024-06-04 08:56:19 +00:00
17851c9d11
projects.mk / py-defs.mk: Support Python 3.10
...
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>
2022-10-04 11:05:24 +00:00
f3febfa460
py-defs.mk, projects.mk: Fix /usr/bin/python globbing on OpenSUSE
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-05-18 13:15:35 +00:00
caf33841b4
py-defs.mk, projects.mk: Use latest install Python
...
Use $(lastword $(shell ls -v /usr/bin/python[0-9]*)) for the Python version to use.
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-05-16 13:22:51 +00:00
a82fa9023b
py-xxx.mk: Introduce PYTHON_MAJOR
...
Where *.pyc files are created is decided by PYTHON_MAJOR, not PYTHON_VERSION, so introduce it.
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-05-16 13:09:16 +00:00
fab119fca9
py-defs.mk: Add MYPYPATH to py-libpath target
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-04-26 19:04:18 +00:00
a404be15b9
make, scripts: Add support for static Python typechecking
...
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>
2020-04-10 12:13:12 +00:00
d8542717b1
py-defs.mk: Add PY_PREREQ_RUN in PYTHONPATH
...
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>
2020-04-05 12:51:08 +00:00
921a929cd3
Ubuntu: Fix PY_SITE_PACKAGES_PATH
...
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>
2019-11-13 12:49:27 +00:00
9f0276ead5
py-defs.mk: Fix clean target
...
pyc.clean was broken because it did rm -f __pycache__ (a directory) Also, add include guards.
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-10-28 12:20:50 +00:00
b2d6e6f554
Everywhere: Rename MODDIR -> 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 21:34:18 +00:00
386f9304c6
py-defs.mk: Add automatic detection of PY_CPYTHON_PREFIX
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-11 08:47:46 +00:00
ab5fc0c334
py-defs.mk: Fix installation with predefined PY_INSTALL_DIR
...
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>
2019-06-11 08:31:11 +00:00
4e9be149ef
py-defs.mk: Fix PY_INSTALL_XXX_MOD generation
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-09 06:24:43 +00:00
956aea82eb
py-*.mk: Fix python version detection
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-03 08:00:39 +00:00
13fa28e23f
make, scripts: 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 12:28:13 +00:00
fe161ff4d6
py-defs.mk, py-mod.mk: Add support for Python3's __pycache__
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:35:49 +00:00
aa85417a17
Everywhere: Purge spaces in text files
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 12:38:20 +00:00
0eaef0c326
conf/jcs, make, tmpl/doxygen: Align equal signs in makefiles to column 30
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 18:12:28 +00:00
ed8b3918cc
py-defs.mk: Allow PY_INSTALL_DIR to be overridden (?=)
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-28 13:46:23 +00:00
e68d4eb83b
make, scripts: Now excplicitly calling python2 executable instead of python
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-01-02 13:12:00 +00:00
6bfa55481c
make: Speed up clean targets
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-27 11:43:01 +00:00
f70465cbd5
make: Replace pwd by $(PWD)
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-18 13:45:55 +00:00
3dddce9817
py-defs.mk: Add multiple inclusion preventer
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-11-23 08:41:46 +00:00
2594143b1f
make: Improvements to a couple of makefiles
...
- Depend.mk, ldlibpath.mk: add multiple inclusion guards - Flex-bison.mk some dependency fiddling - Py-defs.mk: remove *.pyc on clean
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-10-30 12:02:43 +00:00
db1e6097fa
ldlibpath.mk, py-defs.mk, rules.mk: Add ldlibpath.mk to py-defs.mk
...
Since python might need bound C libraries, too, this looks like a good idea.
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-08-01 21:53:36 +00:00
ad2c1da54a
py-defs.mk: Add (disabled) support for python3
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-26 09:45:54 +00:00
3f782d3f3f
py-defs/py-mod.mk: Fix __init__.py generation
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-25 15:04:44 +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
cdabaad7ef
py-*.mk: Fill PYTHONPATH from build dependencies
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-22 18:16:08 +00:00
f8747fcdbd
py-defs.mk, py-mod.mk: Add exports to __init__.py
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-22 14:34:23 +00:00
d49340917b
make: Add py-defs.mk py-mod.mk py-run.mk
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-21 15:34:16 +00:00