mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-07 12:32:56 +02:00
New package: nanovna-saver-0.7.3
This commit is contained in:
parent
9a5efab3e6
commit
3814051d47
3 changed files with 69 additions and 0 deletions
17
srcpkgs/nanovna-saver/patches/pep517-backend.patch
Normal file
17
srcpkgs/nanovna-saver/patches/pep517-backend.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
don't use the custom backend, we do the ui compilation in pre_build
|
||||||
|
|
||||||
|
--- a/pyproject.toml
|
||||||
|
+++ b/pyproject.toml
|
||||||
|
@@ -69,11 +69,7 @@
|
||||||
|
"setuptools>=64",
|
||||||
|
"setuptools-scm>=8"
|
||||||
|
]
|
||||||
|
-# build-backend = 'setuptools.build_meta'
|
||||||
|
-# in-tree build backend, wrapper around setuptools, just to run ui-compile task
|
||||||
|
-# See also https://setuptools.pypa.io/en/latest/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks
|
||||||
|
-build-backend = "setuptools_wrapper"
|
||||||
|
-backend-path = ["src/tools"]
|
||||||
|
+build-backend = 'setuptools.build_meta'
|
||||||
|
|
||||||
|
[tool.setuptools.exclude-package-data]
|
||||||
|
"*" = ['*.png', '*.ui', '*.qrc' ]
|
24
srcpkgs/nanovna-saver/patches/pyside-tools.patch
Normal file
24
srcpkgs/nanovna-saver/patches/pyside-tools.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
pyside6-$tool is equivalent to $tool -g python
|
||||||
|
|
||||||
|
--- a/src/tools/ui_compile.py
|
||||||
|
+++ b/src/tools/ui_compile.py
|
||||||
|
@@ -19,7 +19,9 @@
|
||||||
|
python_name = f"{ui_file_name.replace('.ui', '')}.py"
|
||||||
|
|
||||||
|
cmd = [
|
||||||
|
- "pyside6-uic",
|
||||||
|
+ "/usr/lib/qt6/libexec/uic",
|
||||||
|
+ "-g",
|
||||||
|
+ "python",
|
||||||
|
str(ui_file),
|
||||||
|
"-o",
|
||||||
|
str(dir / python_name),
|
||||||
|
@@ -36,7 +36,7 @@
|
||||||
|
ui_file_name = qrc_file.name
|
||||||
|
python_name = f"{ui_file_name.replace('.qrc', '')}_rc.py"
|
||||||
|
|
||||||
|
- cmd = ["pyside6-rcc", str(qrc_file), "-o", str(dir / python_name)]
|
||||||
|
+ cmd = ["/usr/lib/qt6/libexec/rcc", "-g", "python", str(qrc_file), "-o", str(dir / python_name)]
|
||||||
|
print(f"{' '.join(cmd)}")
|
||||||
|
subprocess.run(cmd, check=True)
|
||||||
|
|
28
srcpkgs/nanovna-saver/template
Normal file
28
srcpkgs/nanovna-saver/template
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Template file for 'nanovna-saver'
|
||||||
|
pkgname=nanovna-saver
|
||||||
|
version=0.7.3
|
||||||
|
revision=1
|
||||||
|
build_style=python3-pep517
|
||||||
|
hostmakedepends="python3-setuptools python3-setuptools_scm python3-pyside6 qt6-base"
|
||||||
|
depends="python3-pyserial python3-pyside6 python3-numpy python3-scipy"
|
||||||
|
checkdepends="python3-pytest python3-pytest-cov ${depends}"
|
||||||
|
short_desc="Tool for reading, displaying and saving data from the NanoVNA"
|
||||||
|
maintainer="classabbyamp <void@placeviolette.net>"
|
||||||
|
license="GPL-3.0-or-later"
|
||||||
|
homepage="https://github.com/NanoVNA-Saver/nanovna-saver"
|
||||||
|
changelog="https://github.com/NanoVNA-Saver/nanovna-saver/releases"
|
||||||
|
distfiles="https://github.com/NanoVNA-Saver/nanovna-saver/archive/refs/tags/v${version}.tar.gz"
|
||||||
|
checksum=932a9d54e6cdf3a7ee4fd9e5c75f8721b5a249b1de320feefb013de293717cd1
|
||||||
|
|
||||||
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
||||||
|
|
||||||
|
pre_build() {
|
||||||
|
python src/tools/ui_compile.py
|
||||||
|
rm -r src/tools
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vman docs/man/NanoVNASaver.1
|
||||||
|
vinstall NanoVNASaver.desktop 0644 usr/share/applications
|
||||||
|
vinstall NanoVNASaver_48x48.png 0644 usr/share/icons/hicolor/48x48/apps NanoVNASaver_48x48.png
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue