Fixing deb building

This commit is contained in:
Adsooi 2024-09-30 00:54:30 +02:00
parent 34cb856dd4
commit ca5c7492dc
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
9 changed files with 59 additions and 54 deletions

View file

@ -0,0 +1 @@
../../logplotterfile.svg

View file

@ -3,9 +3,9 @@ Source: logarithmplotter
Version: 0.6.0
Architecture: all
Maintainer: Ad5001 <mail@ad5001.eu>
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/

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"]),

View file

@ -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

View file

@ -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