From 8f1bc652b4bab884f4832d10f0b77292303ec61b Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sat, 5 Mar 2022 16:43:22 +0100 Subject: [PATCH] Addign dependencies for latex. --- .../eu/ad5001/LogarithmPlotter/js/latex.js | 23 ++++++++++++++++--- LogarithmPlotter/util/__init__.py | 1 + linux/debian/control | 4 ++-- linux/debian/depends | 2 +- setup.py | 2 +- 5 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 LogarithmPlotter/util/__init__.py diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/latex.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/latex.js index 772a376..9d010e3 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/latex.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/latex.js @@ -19,17 +19,34 @@ .import "expr-eval.js" as ExprEval -// Puts element within parenthesis +/** + * Puts element within parenthesis. + * + * @param {string} elem - element to put within parenthesis. + * @returns {string} + */ function par(elem) { return '(' + elem + ')' } -// checks if the element contains a string, and returns the parenthesis version if so. +/** + * Checks if the element contains at least one of the elements of + * the string array contents , and returns the parenthesis version if so. + * + * @param {string} elem - element to put within parenthesis. + * @param {Array} contents - Array of elements to put within parenthesis. + * @returns {string} + */ function parif(elem, contents) { return contents.some(elem.includes) ? par(elem) : elem } -// Adpation of expressionToString for latex +/** + * This function converts expr-eval tokens to a latex string. + * + * @param {Array} tokens - expr-eval tokens list + * @returns {string} + */ function expressionToLatex(tokens) { var nstack = []; var n1, n2, n3; diff --git a/LogarithmPlotter/util/__init__.py b/LogarithmPlotter/util/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/LogarithmPlotter/util/__init__.py @@ -0,0 +1 @@ + diff --git a/linux/debian/control b/linux/debian/control index 402db4c..a4fe523 100644 --- a/linux/debian/control +++ b/linux/debian/control @@ -3,11 +3,11 @@ Source: logarithmplotter Version: 0.1.9 Architecture: all Maintainer: Ad5001 -Depends: python3, python3-pip, qml-module-qtquick-controls2 (>= 5.12.0), qml-module-qtmultimedia (>= 5.12.0), qml-module-qtgraphicaleffects (>= 5.12.0), qml-module-qtquick2 (>= 5.12.0), qml-module-qtqml-models2 (>= 5.12.0), qml-module-qtquick-controls (>= 5.12.0), python3-pyside2.qtcore (>= 5.12.0), python3-pyside2.qtqml (>= 5.12.0), python3-pyside2.qtgui (>= 5.12.0), python3-pyside2.qtquick (>= 5.12.0), python3-pyside2.qtwidgets (>= 5.12.0), python3-pyside2.qtmultimedia (>= 5.12.0), python3-pyside2.qtnetwork (>= 5.12.0) +Depends: python3, python3-pip, qml-module-qtquick-controls2 (>= 5.12.0), qml-module-qtmultimedia (>= 5.12.0), qml-module-qtgraphicaleffects (>= 5.12.0), qml-module-qtquick2 (>= 5.12.0), qml-module-qtqml-models2 (>= 5.12.0), qml-module-qtquick-controls (>= 5.12.0), python3-pyside2.qtcore (>= 5.12.0), python3-pyside2.qtqml (>= 5.12.0), python3-pyside2.qtgui (>= 5.12.0), python3-pyside2.qtquick (>= 5.12.0), python3-pyside2.qtwidgets (>= 5.12.0), python3-pyside2.qtmultimedia (>= 5.12.0), python3-pyside2.qtnetwork (>= 5.12.0), python3-sympy Build-Depends: debhelper (>=11~), dh-python, dpkg-dev (>= 1.16.1~), python-setuptools, python3-all-dev (>=3.6) Section: science Priority: optional -Homepage: https://apps.ad5001.eu/logarithmplotter +Homepage: https://apps.ad5001.eu/logarithmplotter/ Installed-Size: 174 Description: Create graphs with logarithm scales. diff --git a/linux/debian/depends b/linux/debian/depends index 3f307c1..725059d 100644 --- a/linux/debian/depends +++ b/linux/debian/depends @@ -1 +1 @@ -python3-pip, qml-module-qtquick-controls2 (>= 5.12.0), qml-module-qtmultimedia (>= 5.12.0), qml-module-qtgraphicaleffects (>= 5.12.0), qml-module-qtquick2 (>= 5.12.0), qml-module-qtqml-models2 (>= 5.12.0), qml-module-qtquick-controls (>= 5.12.0), python3-pyside2.qtcore (>= 5.12.0), python3-pyside2.qtqml (>= 5.12.0), python3-pyside2.qtgui (>= 5.12.0), python3-pyside2.qtquick (>= 5.12.0), python3-pyside2.qtwidgets (>= 5.12.0), python3-pyside2.qtmultimedia (>= 5.12.0), python3-pyside2.qtnetwork (>= 5.12.0) +python3-pip, qml-module-qtquick-controls2 (>= 5.12.0), qml-module-qtmultimedia (>= 5.12.0), qml-module-qtgraphicaleffects (>= 5.12.0), qml-module-qtquick2 (>= 5.12.0), qml-module-qtqml-models2 (>= 5.12.0), qml-module-qtquick-controls (>= 5.12.0), python3-pyside2.qtcore (>= 5.12.0), python3-pyside2.qtqml (>= 5.12.0), python3-pyside2.qtgui (>= 5.12.0), python3-pyside2.qtquick (>= 5.12.0), python3-pyside2.qtwidgets (>= 5.12.0), python3-pyside2.qtmultimedia (>= 5.12.0), python3-pyside2.qtnetwork (>= 5.12.0), python3-sympy diff --git a/setup.py b/setup.py index cf735db..e322dc9 100644 --- a/setup.py +++ b/setup.py @@ -127,7 +127,7 @@ if sys.platform == 'linux': os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') setuptools.setup( - install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide2"]), + install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide2", "sympy"]), python_requires='>=3.8', name='logarithmplotter',