mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
python-flask-babel: update to 4.0.0; add test.sh
Changes since 3.1.0: - drop Python 3.7 support; add PyPy 3.9 compatibility - replace deprecated locked_cached_property with cached_property Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
2a998b61db
commit
c391447d12
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=python-flask-babel
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_VERSION:=4.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PYPI_NAME:=flask-babel
|
||||
PYPI_SOURCE_NAME:=flask_babel
|
||||
PKG_HASH:=be015772c5d7f046f3b99c508dcf618636eb93d21b713b356db79f3e79f69f39
|
||||
PKG_HASH:=dbeab4027a3f4a87678a11686496e98e1492eb793cbdd77ab50f4e9a2602a593
|
||||
|
||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = python3-flask-babel ] || exit 0
|
||||
|
||||
python3 - <<'EOF'
|
||||
from flask import Flask
|
||||
from flask_babel import Babel, gettext, lazy_gettext
|
||||
|
||||
app = Flask(__name__)
|
||||
babel = Babel(app)
|
||||
|
||||
with app.app_context():
|
||||
result = gettext("Hello")
|
||||
assert isinstance(result, str), "gettext should return a string"
|
||||
|
||||
lazy = lazy_gettext("World")
|
||||
assert str(lazy) == "World", f"lazy_gettext failed: {lazy!r}"
|
||||
|
||||
print("python3-flask-babel OK")
|
||||
EOF
|
||||
Reference in New Issue
Block a user