From ca5c7492dcf8507e7aa4e7d1db14149debbc6afd Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Mon, 30 Sep 2024 00:54:30 +0200 Subject: [PATCH] Fixing deb building --- .../linux/application-x-logarithm-plot.svg | 1 + assets/native/linux/debian/control | 4 +- assets/native/linux/debian/depends | 2 +- assets/native/linux/logarithmplotter.desktop | 2 +- runtime-pyside6/poetry.lock | 38 +++++++-------- runtime-pyside6/pyproject.toml | 1 + runtime-pyside6/setup.py | 48 +++++++++---------- scripts/package-deb.sh | 14 ++++-- scripts/sign-deb.sh | 3 +- 9 files changed, 59 insertions(+), 54 deletions(-) create mode 120000 assets/native/linux/application-x-logarithm-plot.svg diff --git a/assets/native/linux/application-x-logarithm-plot.svg b/assets/native/linux/application-x-logarithm-plot.svg new file mode 120000 index 0000000..4e7d218 --- /dev/null +++ b/assets/native/linux/application-x-logarithm-plot.svg @@ -0,0 +1 @@ +../../logplotterfile.svg \ No newline at end of file diff --git a/assets/native/linux/debian/control b/assets/native/linux/debian/control index 57281bc..a1089e7 100644 --- a/assets/native/linux/debian/control +++ b/assets/native/linux/debian/control @@ -3,9 +3,9 @@ Source: logarithmplotter Version: 0.6.0 Architecture: all Maintainer: Ad5001 -Depends: python3, python3-pip, python3-pyside6-essentials (>= 6.7.0), texlive-latex-base, dvipng +Depends: python3 (>= 3.9), python3-pip, python3-pyside6-essentials (>= 6.7.0), texlive-latex-base, dvipng -Build-Depends: debhelper (>=11~), dh-python, dpkg-dev (>= 1.16.1~), python-setuptools, python3-all-dev (>=3.9) +Build-Depends: debhelper (>=11~), dh-python, dpkg-dev (>= 1.16.1~), python-setuptools Section: science Priority: optional Homepage: https://apps.ad5001.eu/logarithmplotter/ diff --git a/assets/native/linux/debian/depends b/assets/native/linux/debian/depends index 5eea4fd..5b7d902 100644 --- a/assets/native/linux/debian/depends +++ b/assets/native/linux/debian/depends @@ -1 +1 @@ -python3, python3-pip, python3-pyside6-essentials (>= 6.7.0), texlive-latex-base, dvipng +python3 (>= 3.9), python3-pip, python3-pyside6-essentials (>= 6.7.0), texlive-latex-base, dvipng diff --git a/assets/native/linux/logarithmplotter.desktop b/assets/native/linux/logarithmplotter.desktop index 00c871f..70637c5 100644 --- a/assets/native/linux/logarithmplotter.desktop +++ b/assets/native/linux/logarithmplotter.desktop @@ -14,7 +14,7 @@ Comment[hu]=Bode-ábrák, sorozatok és újraosztási függvények létrehozása TryExec=logarithmplotter Exec=logarithmplotter %f -Icon=logplotter +Icon=logarithmplotter MimeType=application/x-logarithm-plot; Terminal=false StartupNotify=false diff --git a/runtime-pyside6/poetry.lock b/runtime-pyside6/poetry.lock index c94f9e7..2979b69 100644 --- a/runtime-pyside6/poetry.lock +++ b/runtime-pyside6/poetry.lock @@ -261,36 +261,36 @@ setuptools = ">=42.0.0" [[package]] name = "pyside6-addons" -version = "6.7.2" +version = "6.7.3" description = "Python bindings for the Qt cross-platform application and UI framework (Addons)" optional = false python-versions = "<3.13,>=3.9" files = [ - {file = "PySide6_Addons-6.7.2-cp39-abi3-macosx_11_0_universal2.whl", hash = "sha256:90b995efce61058d995c603ea480a9a3054fe8206739dcbc273fc3b53d40650f"}, - {file = "PySide6_Addons-6.7.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:94b9bf6a2a4a7ac671e1776633e50d51326c86f4184f1c6e556f4dd5498fd52a"}, - {file = "PySide6_Addons-6.7.2-cp39-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:22979b1aa09d9cf1d7a86c8a9aa0cb4791d6bd1cc94f96c5b6780c5ef8a9e34e"}, - {file = "PySide6_Addons-6.7.2-cp39-abi3-win_amd64.whl", hash = "sha256:ebf549eb25998665d8e4ec24014fbbd37bebc5ecdcb050b34db1e1c03e1bf81d"}, + {file = "PySide6_Addons-6.7.3-cp39-abi3-macosx_11_0_universal2.whl", hash = "sha256:3174cb3a373c09c98740b452e8e8f4945d64cfa18ed8d43964111d570f0dc647"}, + {file = "PySide6_Addons-6.7.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:bde1eb03dbffd089b50cd445847aaecaf4056cea84c49ea592d00f84f247251e"}, + {file = "PySide6_Addons-6.7.3-cp39-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:5a9e0df31345fe6caea677d916ea48b53ba86f95cc6499c57f89e392447ad6db"}, + {file = "PySide6_Addons-6.7.3-cp39-abi3-win_amd64.whl", hash = "sha256:d8a19c2b2446407724c81c33ebf3217eaabd092f0f72da8130c17079e04a7813"}, ] [package.dependencies] -PySide6-Essentials = "6.7.2" -shiboken6 = "6.7.2" +PySide6-Essentials = "6.7.3" +shiboken6 = "6.7.3" [[package]] name = "pyside6-essentials" -version = "6.7.2" +version = "6.7.3" description = "Python bindings for the Qt cross-platform application and UI framework (Essentials)" optional = false python-versions = "<3.13,>=3.9" files = [ - {file = "PySide6_Essentials-6.7.2-cp39-abi3-macosx_11_0_universal2.whl", hash = "sha256:4d13666e796ec140ecfb432c4f3d7baef6dfafc11929985a83b22c0025532fb7"}, - {file = "PySide6_Essentials-6.7.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a1a4c09f1e916b9cfe53151fe4a503a6acb1f6621ba28204d1bfe636f80d6780"}, - {file = "PySide6_Essentials-6.7.2-cp39-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:9135513e1c4c6e2fbb1e4f9afcb3d42e54708b0d9ed870cb3213ea4874cafa1e"}, - {file = "PySide6_Essentials-6.7.2-cp39-abi3-win_amd64.whl", hash = "sha256:0111d5fa8cf826de3ca9d82fed54726cce116d57f454f88a6467578652032d69"}, + {file = "PySide6_Essentials-6.7.3-cp39-abi3-macosx_11_0_universal2.whl", hash = "sha256:f9e08a4e9e7dc7b5ab72fde20abce8c97df7af1b802d9743f098f577dfe1f649"}, + {file = "PySide6_Essentials-6.7.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cda6fd26aead48f32e57f044d18aa75dc39265b49d7957f515ce7ac3989e7029"}, + {file = "PySide6_Essentials-6.7.3-cp39-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:acdde06b74f26e7d26b4ae1461081b32a6cb17fcaa2a580050b5e0f0f12236c9"}, + {file = "PySide6_Essentials-6.7.3-cp39-abi3-win_amd64.whl", hash = "sha256:f0950fcdcbcd4f2443336dc6a5fe692172adc225f876839583503ded0ab2f2a7"}, ] [package.dependencies] -shiboken6 = "6.7.2" +shiboken6 = "6.7.3" [[package]] name = "pytest" @@ -384,15 +384,15 @@ type = ["importlib-metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.11 [[package]] name = "shiboken6" -version = "6.7.2" +version = "6.7.3" description = "Python/C++ bindings helper module" optional = false python-versions = "<3.13,>=3.9" files = [ - {file = "shiboken6-6.7.2-cp39-abi3-macosx_11_0_universal2.whl", hash = "sha256:50c33ac6317b673a1eb97a9abaafccb162c4ba0c9ca658a8e449c49a8aadc379"}, - {file = "shiboken6-6.7.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:70e80737b27cd5d83504b373013b55e70462bd4a27217d919ff9a83958731990"}, - {file = "shiboken6-6.7.2-cp39-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:98bedf9a15f1d8ba1af3e4d1e7527f7946ce36da541e08074fd9dc9ab5ff1adf"}, - {file = "shiboken6-6.7.2-cp39-abi3-win_amd64.whl", hash = "sha256:9024e6afb2af1568ebfc8a5d07e4ff6c8829f40923eeb28901f535463e2b6b65"}, + {file = "shiboken6-6.7.3-cp39-abi3-macosx_11_0_universal2.whl", hash = "sha256:285fe3cf79be3135fe1ad1e2b9ff6db3a48698887425af6aa6ed7a05a9abc3d6"}, + {file = "shiboken6-6.7.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f0852e5781de78be5b13c140ec4c7fb9734e2aaf2986eb2d6a224363e03efccc"}, + {file = "shiboken6-6.7.3-cp39-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:f0dd635178e64a45be2f84c9f33dd79ac30328da87f834f21a0baf69ae210e6e"}, + {file = "shiboken6-6.7.3-cp39-abi3-win_amd64.whl", hash = "sha256:5f29325dfa86fde0274240f1f38e421303749d3174ce3ada178715b5f4719db9"}, ] [[package]] @@ -449,4 +449,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.13" -content-hash = "30da53f0a05c06c5f93aa1260217d807ce2ab64debd26f313b47c664931e67c7" +content-hash = "867f6da20f7e5b66e5d6cf927b56b335e81ff15f53d4ee0fc3c68ab1603de7af" diff --git a/runtime-pyside6/pyproject.toml b/runtime-pyside6/pyproject.toml index 7b5b6f6..94af012 100644 --- a/runtime-pyside6/pyproject.toml +++ b/runtime-pyside6/pyproject.toml @@ -15,6 +15,7 @@ pyside6-addons = "^6.7.2" [tool.poetry.group.packaging.dependencies] pyinstaller = "^6.10.0" stdeb = "^0.10.0" +setuptools = "^75.1.0" [tool.poetry.group.test.dependencies] pytest = "^8.3.3" diff --git a/runtime-pyside6/setup.py b/runtime-pyside6/setup.py index 5d1aae7..e2bbd57 100644 --- a/runtime-pyside6/setup.py +++ b/runtime-pyside6/setup.py @@ -96,30 +96,30 @@ def package_data(): data_files = [] if sys.platform == 'linux': - data_files.append(('share/applications/', ['linux/logarithmplotter.desktop'])) - data_files.append(('share/mime/packages/', ['linux/x-logarithm-plot.xml'])) - data_files.append(('share/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg'])) - data_files.append(('share/icons/hicolor/scalable/apps/', ['logplotter.svg'])) - data_files.append((os.environ["PREFIX"] + '/applications/', ['linux/logarithmplotter.desktop'])) - data_files.append((os.environ["PREFIX"] + '/mime/packages/', ['linux/x-logarithm-plot.xml'])) - data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg'])) - data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg'])) - if len(sys.argv) > 1: - if sys.argv[1] == "install": - os.makedirs(os.environ["PREFIX"] + '/applications/', exist_ok=True) - os.makedirs(os.environ["PREFIX"] + '/mime/packages/', exist_ok=True) - os.makedirs(os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', exist_ok=True) - os.makedirs(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', exist_ok=True) - os.makedirs(os.environ["PREFIX"] + '/metainfo/', exist_ok=True) - copyfile(current_dir + '/linux/x-logarithm-plot.xml', os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml') - copyfile(current_dir + '/linux/application-x-logarithm-plot.svg', - os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg') - copyfile(current_dir + '/logplotter.svg', os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') - elif sys.argv[1] == "uninstall": - os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop') - os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml') - os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg') - os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') + data_files.append(('share/applications/', ['assets/native/linux/logarithmplotter.desktop'])) + data_files.append(('share/mime/packages/', ['assets/native/linux/x-logarithm-plot.xml'])) + data_files.append(('share/icons/hicolor/scalable/mimetypes/', ['assets/native/linux/application-x-logarithm-plot.svg'])) + data_files.append(('share/icons/hicolor/scalable/apps/', ['assets/logarithmplotter.svg'])) + # data_files.append((os.environ["PREFIX"] + '/applications/', ['linux/logarithmplotter.desktop'])) + # data_files.append((os.environ["PREFIX"] + '/mime/packages/', ['linux/x-logarithm-plot.xml'])) + # data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg'])) + # data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg'])) + # if len(sys.argv) > 1: + # if sys.argv[1] == "install": + # os.makedirs(os.environ["PREFIX"] + '/applications/', exist_ok=True) + # os.makedirs(os.environ["PREFIX"] + '/mime/packages/', exist_ok=True) + # os.makedirs(os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', exist_ok=True) + # os.makedirs(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', exist_ok=True) + # os.makedirs(os.environ["PREFIX"] + '/metainfo/', exist_ok=True) + # copyfile(current_dir + '/linux/x-logarithm-plot.xml', os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml') + # copyfile(current_dir + '/linux/application-x-logarithm-plot.svg', + # os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg') + # copyfile(current_dir + '/logplotter.svg', os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') + # elif sys.argv[1] == "uninstall": + # os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop') + # os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml') + # os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg') + # os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') setuptools.setup( install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide6-Essentials"]), diff --git a/scripts/package-deb.sh b/scripts/package-deb.sh index 477ecda..b280675 100755 --- a/scripts/package-deb.sh +++ b/scripts/package-deb.sh @@ -1,11 +1,15 @@ #!/bin/bash -cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1 rm -rf build bash scripts/build.sh -cd build || exit 1 +cd build/runtime-pyside6 || exit 1 -# Deb -sudo python3 setup.py --remove-git-version --command-packages=stdeb.command sdist_dsc \ - --package logarithmplotter --copyright-file linux/debian/copyright --suite noble --depends3 "$(cat linux/debian/depends)" --section science \ +mkdir assets +cp -r ../../assets/{native,*.svg} assets/ +cp ../../README.md . + +python3 setup.py --remove-git-version --command-packages=stdeb.command sdist_dsc \ + --package logarithmplotter --copyright-file assets/native/linux/debian/copyright \ + --suite noble --depends3 "$(cat assets/native/linux/debian/depends)" --section science \ bdist_deb diff --git a/scripts/sign-deb.sh b/scripts/sign-deb.sh index 6939243..f8e0a9a 100755 --- a/scripts/sign-deb.sh +++ b/scripts/sign-deb.sh @@ -1,11 +1,10 @@ #!/bin/bash # This script is used to sign the LogarithmPlotter deb directly from it's DSC file. # Adapted from https://github.com/astraw/stdeb/issues/181 +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/../build/runtime-pyside6/deb_dist" || exit 1 PPA_ARCHIVE="ppa:ad5001/logarithmplotter" -cd ../deb_dist - # create a temporary folder mkdir tmp -p cd tmp