From ad14650fc5bc744ba2e4a8aa6d741b3661fcc820 Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 15 Oct 2022 23:01:26 +0200 Subject: [PATCH] experimental rpm build (works on a debian system) Signed-off-by: Martin --- .gitignore | 1 + Makefile | 18 ++++++++++++++++-- setup.cfg | 6 +++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 74290ac..f5ac704 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ settings.json /nanovna-saver.exe.spec /deb_dist/ *.deb +*.rpm *.tar.gz *~ .*~ diff --git a/Makefile b/Makefile index 8848ac4..f480bad 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: info info: @echo "- type 'make deb' to build a debian package" + @echo "- type 'make rpm' to build an (experimental) rpm package" @echo "- you need the debian packages" @echo " fakeroot python3-setuptools python3-stdeb dh-python" @echo @@ -8,18 +9,31 @@ info: # build a new debian package and create a link in the current directory .PHONY: deb -deb: distclean +deb: clean @# build the deb package PYBUILD_DISABLE=test python3 setup.py \ --command-packages=stdeb.command \ sdist_dsc --compat 10 --package3 nanovnasaver --section electronics \ bdist_deb @# create a link in the main directory + -@ rm nanovnasaver_*_all.deb -@ln `ls deb_dist/nanovnasaver_*.deb | tail -1` . @# and show the result @ls -l nanovnasaver_*.deb +# build a new rpm package and create a link in the current directory +.PHONY: rpm +rpm: clean + @# build the rpm package + PYBUILD_DISABLE=test python3 setup.py bdist_rpm + @# create a link in the main directory + -@ rm NanoVNASaver-*.noarch.rpm + @ln `ls dist/NanoVNASaver-*.noarch.rpm | tail -1` . + @# and show the result + @ls -l NanoVNASaver-*.noarch.rpm + + # remove all package build artifacts (keep the *.deb) .PHONY: clean clean: @@ -30,7 +44,7 @@ clean: # remove all package build artefacts .PHONY: distclean distclean: clean - -rm -f *.deb + -rm -f *.deb *.rpm # build and install a new debian package diff --git a/setup.cfg b/setup.cfg index 364ec29..e4a3728 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,8 @@ version = attr: NanoVNASaver.About.VERSION platforms= all [options] -packages = find_namespace: +# do not use "find_namespace:" because this may recursively include "build" +packages = find: install_requires= pyserial>=3.5 PyQt5>=5.15.0 @@ -24,3 +25,6 @@ python_requires = >=3.8, <4 console_scripts = NanoVNASaver = NanoVNASaver.__main__:main +# without this option the rpm-build includes also the "test" directory +[options.packages.find] +exclude = test