2015-09-17 01:29:58 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# micropython
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2022-02-14 22:19:27 +01:00
|
|
|
MICROPYTHON_VERSION = 1.18
|
package: remove 'v' prefix from github-fetched packages
On Github, a large number of projects name their tag vXYZ (i.e v3.0,
v0.1, etc.). In some packages we do:
<pkg>_VERSION = v0.3
<pkg>_SITE = $(call github foo,bar,$(<pkg>_VERSION))
And in some other packages we do:
<pkg>_VERSION = 0.3
<pkg>_SITE = $(call github foo,bar,v$(<pkg>_VERSION))
I.e in one case we consider the version to be v0.3, in the other case
we consider 0.3 to be the version.
The problem with v0.3 is that when used in conjunction with
release-monitoring.org, it doesn't work very well, because
release-monitoring.org has the concept of "version prefix" and using
that they drop the "v" prefix for the version.
Therefore, a number of packages in Buildroot have a version that
doesn't match with release-monitoring.org because Buildroot has 'v0.3'
and release-monitoring.org has '0.3'.
Since really the version number of 0.3, is makes sense to update our
packages to drop this 'v'.
This commit only addresses the (common) case of github packages where
the prefix is simply 'v'. Other cases will be handled by separate
commits. Also, there are a few cases that couldn't be handled
mechanically that aren't covered by this commit.
Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
[Arnout: don't change flatbuffers, json-for-modern-cpp, libpagekite,
python-scapy3k, softether]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-12 08:42:06 +02:00
|
|
|
MICROPYTHON_SITE = $(call github,micropython,micropython,v$(MICROPYTHON_VERSION))
|
2021-09-22 10:31:13 +02:00
|
|
|
# Micropython has a lot of code copied from other projects, and also a number
|
|
|
|
# of submodules for various libs. However, we don't even clone the submodules,
|
|
|
|
# and most of the copied code is not used in the unix build.
|
2021-11-20 12:37:28 +01:00
|
|
|
MICROPYTHON_LICENSE = MIT, BSD-1-Clause, BSD-3-Clause, Zlib
|
2015-09-17 01:29:58 +02:00
|
|
|
MICROPYTHON_LICENSE_FILES = LICENSE
|
package/micropython: depends on host-python3
Replace BR2_PYTHON3_HOST_DEPENDENCY by host-python3 to avoid the
following build failure raised since bump to version 1.17 in commit
32b2a03745785afeb496979aa3c0f654bc6063ce:
Traceback (most recent call last):
File "../py/makeversionhdr.py", line 117, in <module>
make_version_header(sys.argv[1])
File "../py/makeversionhdr.py", line 79, in make_version_header
info = get_version_info_from_docs_conf()
File "../py/makeversionhdr.py", line 67, in get_version_info_from_docs_conf
for line in f:
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2154: ordinal not in range(128)
Indeed, this build failure is not reproduced by host-python3 (in version
3.9.7) so it is probably an issue with python 3.5 (which is 6-years old).
Fixes:
- http://autobuild.buildroot.org/results/96f7b81f5d14715b0b6673a8016a31e9e1552d0b
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-10-14 23:30:25 +02:00
|
|
|
MICROPYTHON_DEPENDENCIES = host-pkgconf libffi host-python3
|
2015-09-17 01:29:58 +02:00
|
|
|
|
2019-10-17 18:52:07 +02:00
|
|
|
# Set GIT_DIR so package won't use buildroot's version number
|
|
|
|
MICROPYTHON_MAKE_ENV = \
|
|
|
|
$(TARGET_MAKE_ENV) \
|
|
|
|
GIT_DIR=.
|
|
|
|
|
2015-09-17 01:29:58 +02:00
|
|
|
# Use fallback implementation for exception handling on architectures that don't
|
|
|
|
# have explicit support.
|
2015-09-24 01:43:49 +02:00
|
|
|
ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
|
2015-09-17 01:29:58 +02:00
|
|
|
MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
|
|
|
|
endif
|
|
|
|
|
2021-03-29 09:28:28 +02:00
|
|
|
# xtensa has problems with nlr_push, use setjmp based implementation instead
|
|
|
|
ifeq ($(BR2_xtensa),y)
|
|
|
|
MICROPYTHON_CFLAGS = -DMICROPY_NLR_SETJMP=1
|
|
|
|
endif
|
|
|
|
|
2016-08-25 13:01:03 +02:00
|
|
|
# When building from a tarball we don't have some of the dependencies that are in
|
|
|
|
# the git repository as submodules
|
2020-09-19 12:01:38 +02:00
|
|
|
MICROPYTHON_MAKE_OPTS += \
|
|
|
|
MICROPY_PY_BTREE=0 \
|
|
|
|
MICROPY_PY_USSL=0 \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \
|
|
|
|
CWARN=
|
2016-08-25 13:01:03 +02:00
|
|
|
|
2015-09-17 01:29:58 +02:00
|
|
|
define MICROPYTHON_BUILD_CMDS
|
2019-10-17 18:52:07 +02:00
|
|
|
$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/mpy-cross
|
|
|
|
$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
|
2020-09-19 12:01:38 +02:00
|
|
|
$(MICROPYTHON_MAKE_OPTS)
|
2015-09-17 01:29:58 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define MICROPYTHON_INSTALL_TARGET_CMDS
|
2019-10-17 18:52:07 +02:00
|
|
|
$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
|
2016-08-25 13:01:03 +02:00
|
|
|
$(MICROPYTHON_MAKE_OPTS) \
|
2015-09-17 01:29:58 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) \
|
2020-09-14 10:58:30 +02:00
|
|
|
PREFIX=/usr \
|
2015-09-17 01:29:58 +02:00
|
|
|
install
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|