diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2022-03-07 21:29:56 +0800 |
|---|---|---|
| committer | Rosen Penev <rosenp@gmail.com> | 2022-03-17 11:38:19 -0700 |
| commit | 2f81f907c2ccfc8d905cb0dfc78dbb2ffe75e6c7 (patch) | |
| tree | 8dbfc777dbdd96f7d2ec8e97462b6798dbaf6b05 /lang/python/README.md | |
| parent | 6000735f3446d2e876335122066c28b3f335db1e (diff) | |
python3: Add Py3Build/InstallBuildDepends recipe
This adds a recipe, Py3Build/InstallBuildDepends, that installs the
requirements listed in HOST_PYTHON3_PACKAGE_BUILD_DEPENDS. This allows
other (non-Python) packages to install host Python packages by calling
this recipe, without having to know the internals of python3-package.mk.
This also updates apparmor to call this recipe.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/README.md')
| -rw-r--r-- | lang/python/README.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lang/python/README.md b/lang/python/README.md index 5681cb5d3..2a05d3c00 100644 --- a/lang/python/README.md +++ b/lang/python/README.md @@ -369,3 +369,30 @@ HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm ``` The Python package will be installed in `$(STAGING_DIR_HOSTPKG)/lib/pythonX.Y/site-packages`. + +#### Non-Python packages installing host-side Python packages + +Non-Python packages can also install host-side Python packages using the same mechanism: + +* Set `HOST_PYTHON3_PACKAGE_BUILD_DEPENDS` (see above for details). + +* Include `python3-package.mk` (set `PYTHON3_PKG_BUILD:=0` to avoid using the default Python package build recipes). + +* Call `Py3Build/InstallBuildDepends` to initiate the installation. + +For example: + +``` +PYTHON3_PKG_BUILD:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm + +include $(INCLUDE_DIR)/package.mk +include ../../lang/python/python3-package.mk +# If outside of the packages feed: +# include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk + +define Build/Compile + $(call Py3Build/InstallBuildDepends) + $(call Build/Compile/Default) +endef +``` |
