Message ID | 20170124101423.11479-2-judge.packham@gmail.com |
---|---|
State | Accepted |
Commit | 2b4d4db2a296859fd509978003c4fa41e4073644 |
Headers | show |
>>>>> "Chris" == Chris Packham <judge.packham@gmail.com> writes: > The micropython libs load libpcre dynamically using the foreign function > interface (libffi). Without pcre the build will succeed but at run time > anything that uses the 're' module will have issues. Using 'depend on' in the subject is imho a bit confusing, as you are selecting it, so I reworded it a bit and committed, thanks.
Hello, On Tue, 24 Jan 2017 23:14:22 +1300, Chris Packham wrote: > The micropython libs load libpcre dynamically using the foreign function > interface (libffi). Without pcre the build will succeed but at run time > anything that uses the 're' module will have issues. If it's only a runtime dependency, then why do you have "MICROPYTHON_LIBS_DEPENDENCIES = pcre" ? Selecting it in Config.in is sufficient to ensure that it will be built "at some point" during the build. In such cases, we normally do just: select BR2_PACKAGE_PCRE # runtime and that's it. Thomas
On Wed, Jan 25, 2017 at 9:54 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Hello, > > On Tue, 24 Jan 2017 23:14:22 +1300, Chris Packham wrote: >> The micropython libs load libpcre dynamically using the foreign function >> interface (libffi). Without pcre the build will succeed but at run time >> anything that uses the 're' module will have issues. > > If it's only a runtime dependency, then why do you have > "MICROPYTHON_LIBS_DEPENDENCIES = pcre" ? Selecting it in Config.in is > sufficient to ensure that it will be built "at some point" during the > build. In such cases, we normally do just: > > select BR2_PACKAGE_PCRE # runtime > > and that's it. Good point. I didn't look for any other examples of runtime dependencies. As Peter has already applied this one I'll send another to clarify that this is a runtime dependency and not a build time one.
diff --git a/package/micropython-lib/Config.in b/package/micropython-lib/Config.in index a7e017be7..be8c87562 100644 --- a/package/micropython-lib/Config.in +++ b/package/micropython-lib/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_MICROPYTHON_LIB bool "micropython-lib" + select BR2_PACKAGE_PCRE depends on BR2_PACKAGE_MICROPYTHON help Core Python libraries ported to MicroPython. diff --git a/package/micropython-lib/micropython-lib.mk b/package/micropython-lib/micropython-lib.mk index a0b533a53..478d6d690 100644 --- a/package/micropython-lib/micropython-lib.mk +++ b/package/micropython-lib/micropython-lib.mk @@ -8,6 +8,7 @@ MICROPYTHON_LIB_VERSION = v1.8.2 MICROPYTHON_LIB_SITE = $(call github,micropython,micropython-lib,$(MICROPYTHON_LIB_VERSION)) MICROPYTHON_LIB_LICENSE = Python software foundation license v2 (some modules), MIT (everything else) MICROPYTHON_LIB_LICENSE_FILES = LICENSE +MICROPYTHON_LIB_DEPENDENCIES = pcre define MICROPYTHON_LIB_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
The micropython libs load libpcre dynamically using the foreign function interface (libffi). Without pcre the build will succeed but at run time anything that uses the 're' module will have issues. Signed-off-by: Chris Packham <judge.packham@gmail.com> --- package/micropython-lib/Config.in | 1 + package/micropython-lib/micropython-lib.mk | 1 + 2 files changed, 2 insertions(+)