diff --git a/Makefile b/Makefile index 28540cd81ed..d27560ec41c 100644 --- a/Makefile +++ b/Makefile @@ -200,11 +200,8 @@ dist: setrequirements writeversion staticdeps staticdeps-cext strip-staticdeps b python setup.py bdist_wheel ls -l dist -read-whl-file-version: - python ./build_tools/read_whl_version.py ${whlfile} > kolibri/VERSION - pex: - ls dist/*.whl | while read whlfile; do $(MAKE) read-whl-file-version whlfile=$$whlfile; pex $$whlfile --disable-cache -o dist/kolibri-`cat kolibri/VERSION | sed 's/+/_/g'`.pex -m kolibri --python-shebang=/usr/bin/python3; done + ls dist/*.whl | while read whlfile; do version=$$(python ./build_tools/read_whl_version.py $$whlfile); pex $$whlfile --disable-cache -o dist/kolibri-`echo $$version | sed 's/+/_/g'`.pex -m kolibri --python-shebang=/usr/bin/python3; done i18n-extract-backend: cd kolibri && python -m kolibri manage makemessages -- -l en --ignore 'node_modules/*' --ignore 'kolibri/dist/*' --all diff --git a/build_tools/read_whl_version.py b/build_tools/read_whl_version.py index c1a85ac1079..f34f5d6688e 100644 --- a/build_tools/read_whl_version.py +++ b/build_tools/read_whl_version.py @@ -1,16 +1,13 @@ -import logging import sys from pkginfo import Wheel -logger = logging.getLogger(__name__) - if __name__ == "__main__": if len(sys.argv) != 2: - logger.error("Usage: read_whl_version.py ") + print("Usage: read_whl_version.py ") # noqa: T201 sys.exit(1) whl_file = sys.argv[1] whl = Wheel(whl_file) - logger.info(whl.version) + print(whl.version) # noqa: T201 sys.exit(0)