[OpenWrt-Devel] building python3 packages outside of lang/python3
Sven Roederer
devel-sven at geroedel.de
Fri May 1 19:01:05 EDT 2020
Am Freitag, 1. Mai 2020, 20:20:05 CEST schrieb Alexandru Ardelean:
> 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 ]
>
We do quite the same in our feed to solve such issue. In addition we have a
check that only one match will be returned by $(wildcard).
https://github.com/freifunk-berlin/firmware-packages/blob/master/freifunk-berlin-generic.mk
LUCIMKFILE:=$(wildcard $(TOPDIR)/feeds/*/luci.mk)
# verify that there is only one single file returned
ifneq (1,$(words $(LUCIMKFILE)))
ifeq (0,$(words $(LUCIMKFILE)))
$(error did not find luci.mk in any feed)
else
$(error found multiple luci.mk files in the feeds)
endif
endif
> 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]
>
Sven
_______________________________________________
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