[OpenWrt-Devel] building python3 packages outside of lang/python3

Alexandru Ardelean ardeleanalex at gmail.com
Fri May 1 14:20:05 EDT 2020


On Fri, May 1, 2020 at 7:04 PM Michael Richardson <mcr at sandelman.ca> wrote:
>
> hi,
> python packages include ../python3-package.mk, and pypi.mk
>
> But I can't do that from my own feed directory.
> I don't want to copy the file!!
>
> Is there a relative path that would get me to feeds/packages/lang/python3?

long-story-short: no

you'll have to settle for some sort of absolute path if you need those
files from the packages feed in some other feed
if you take a look at
https://github.com/openwrt/packages/blob/master/lang/python/README.md
there's a suggestion:
PYTHON3_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/python/python3-package.mk)
[ similar can be done for pypi.mk ]

reason for the wildcard, is in case the "packages" feed is not named
literally 'packages', it picks up the first feed where that mk file is
found;
if there's only one, all is fine; if there's more than one, then
[anyone doing this] it's asking for trouble anyway;

now, i've thought [and maybe Jeffery as well] about maybe doing a
helper that makes a short-hand to the python3-package.mk path somehow
[into the 'packages' feed], but there isn't a good reason to do it;
you still need to know exactly in which feed the 'python3-package.mk'
is found; and that helper needs to be done in OpenWrt core; and core
always needs good reasons to be modified;
so, some people do 'include
$(TOPDIR)/feeds/packages/lang/python/python3-package.mk' directly;
[1]

maybe if [one day] these 2 files move into OpenWrt core, things will
be a bit simpler; but I don't think it's very soon, and I don't feel
it's a big problem [anyway], but that's my opinion;

> I tried the whole thing, but that didn't work.
>
> I settled on:
> include $(INCLUDE_DIR)/../feeds/packages/lang/python/python3-package.mk
>
> which I found ugly, but it worked.

yes & no;
you can choose to do a direct include like [1]

>
> --
> ]               Never tell me the odds!                 | ipv6 mesh networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> ]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list