summaryrefslogtreecommitdiff
path: root/manage
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-09-17 15:31:09 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2021-09-17 15:31:09 +0200
commit7a3a1cd115b7db591953ec2d9972283000f795c8 (patch)
tree83fc5f0a64f552d9614a53d3dff5212f85f986be /manage
parente5e322e8edfec75436168975cca460f0aa422ada (diff)
[mod] manage - use pyenv.activate where it makes sense
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'manage')
-rwxr-xr-xmanage38
1 files changed, 22 insertions, 16 deletions
diff --git a/manage b/manage
index 9a680892..e3bf27b5 100755
--- a/manage
+++ b/manage
@@ -322,22 +322,26 @@ weblate.push.translations() {
}
data.all() {
- data.languages
- data.useragents
- data.osm_keys_tags
- build_msg DATA "update searx/data/ahmia_blacklist.txt"
- pyenv.cmd python searx_extra/update/update_ahmia_blacklist.py
- build_msg DATA "update searx/data/wikidata_units.json"
- pyenv.cmd python searx_extra/update/update_wikidata_units.py
- build_msg DATA "update searx/data/currencies.json"
- pyenv.cmd python searx_extra/update/update_currencies.py
+ ( set -e
+ pyenv.activate
+ data.languages
+ data.useragents
+ data.osm_keys_tags
+ build_msg DATA "update searx/data/ahmia_blacklist.txt"
+ python searx_extra/update/update_ahmia_blacklist.py
+ build_msg DATA "update searx/data/wikidata_units.json"
+ python searx_extra/update/update_wikidata_units.py
+ build_msg DATA "update searx/data/currencies.json"
+ python searx_extra/update/update_currencies.py
+ )
}
data.languages() {
( set -e
+ pyenv.activate
build_msg ENGINES "fetch languages .."
- pyenv.cmd python searx_extra/update/update_languages.py
+ python searx_extra/update/update_languages.py
build_msg ENGINES "update update searx/languages.py"
build_msg DATA "update searx/data/engines_languages.json"
)
@@ -604,18 +608,19 @@ test.pylint() {
# shellcheck disable=SC2086
( set -e
build_msg TEST "[pylint] \$PYLINT_FILES"
- pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
+ pyenv.activate
+ python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
"${PYLINT_FILES[@]}"
build_msg TEST "[pylint] searx/engines"
- pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
+ python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--disable="${PYLINT_SEARX_DISABLE_OPTION}" \
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
searx/engines
build_msg TEST "[pylint] searx tests"
- pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
+ python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--disable="${PYLINT_SEARX_DISABLE_OPTION}" \
--ignore=searx/engines \
searx tests
@@ -644,9 +649,10 @@ test.unit() {
test.coverage() {
build_msg TEST 'unit test coverage'
( set -e
- pyenv.cmd python -m nose2 -C --log-capture --with-coverage --coverage searx -s tests/unit
- pyenv.cmd coverage report
- pyenv.cmd coverage html
+ pyenv.activate
+ python -m nose2 -C --log-capture --with-coverage --coverage searx -s tests/unit
+ coverage report
+ coverage html
)
dump_return $?
}