Skip to content

Commit 3b96c65

Browse files
rjordanszarath
authored andcommitted
Fixing build with pip install and update documentation
This should fix #828 #831 #815 #808 #788 Signed-off-by: Roel Jordans <[email protected]>
1 parent 674f5c3 commit 3b96c65

File tree

5 files changed

+16
-59
lines changed

5 files changed

+16
-59
lines changed

docs/INSTALLATION.md

Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,20 @@
11
# Installation Instructions
22

3-
## Installation and Use with pip
3+
## Installation and Use with pipx
4+
For installation it is recommended to use pipx instead of pip. Most installations nowadays require the usage of a virtual environment when using pip, pipx automatically arranges this for you.
45

5-
Copy the link of the tgz from latest relaese and install it with pip install. e.g.:
6+
Installing the latest release with pipx install. e.g.:
67

7-
pip3 install https://github.com/NanoVNA-Saver/nanovna-saver/archive/refs/tags/v0.5.5.tar.gz
8+
pipx install git+https://github.com/NanoVNA-Saver/nanovna-saver
89

9-
Once completed run with the following command: `NanoVNASaver`
10-
11-
The instructions omit the easiest way to get the program running under Linux - no installation - just start it in the git directory. This makes it difficult for pure users, e.g. hams, who therefore even try to run the Windows exe version under Wine.
12-
13-
Proposal - Add these sections below to the top README.md, e.g. between "Detailed installation instructions" and "Using the software" (Please review and add e.g. more necessary debian packages):
14-
15-
## Running on Linux without installation
16-
17-
The program simply works from the source directory without having to install it.
18-
19-
Simple step-by-step instruction, open a terminal window and type:
10+
Or if you want to install a specific version use:
2011

21-
sudo apt install git python3-pyqt5 python3-numpy python3-scipy
22-
git clone https://github.com/NanoVNA-Saver/nanovna-saver
23-
cd nanovna-saver
12+
pipx install git+https://github.com/NanoVNA-Saver/[email protected]
2413

25-
Perhaps your system needs a few additional python modules:
26-
27-
- Run with `python nanovna-saver.py` and look at the response of (e.g. missing modules).
28-
- Install the missing modules, preferably via `sudo apt install ...`
29-
30-
until `nanovna-saver.py` starts up.
31-
32-
Now the program can be used from the `nanovna-saver` directory.
14+
Once completed run with the following command: `NanoVNASaver`
3315

3416
## Installing via DEB for Debian (and Ubuntu)
17+
🚧 TODO: this is currently broken
3518

3619
The installation has the benefit that it allows you to run the program from anywhere, because the
3720
main program is found via the regular `$PATH` and the modules are located in the Python module path.
@@ -55,36 +38,10 @@ or
5538
sudo apt install ./nanovnasaver....deb
5639

5740
### Installing via RPM (experimental)
41+
🚧 TODO: this is currently broken
5842

5943
`make rpm` builds an (untested) rpm package that can be installed on your system the usual way.
6044

61-
## Ubuntu 20.04 / 22.04 / 24.04
62-
63-
1. Install python3 and pip
64-
65-
sudo apt install python3 python3-pip libxcb-cursor-dev
66-
python3 -m venv ~/.venv_nano
67-
. ~/.venv_nano/bin/activate
68-
pip install -U pip
69-
70-
2. Clone repo and cd into the directory
71-
72-
git clone https://github.com/NanoVNA-Saver/nanovna-saver
73-
cd nanovna-saver
74-
75-
3. Update pip and run the pip installation
76-
77-
python3 -m pip install .
78-
79-
(You may need to install the additional packages python3-distutils,
80-
python3-setuptools and python3-wheel for this command to work on some
81-
distributions.)
82-
83-
4. Once completed run with the following command
84-
85-
. ~/.venv_nano/bin/activate
86-
python3 nanovna-saver.py
87-
8845
## Automated MacOS Build Script
8946

9047
1. If needed, install dependencies
@@ -137,6 +94,6 @@ Via a MacPorts distribution maintained by @ra1nb0w.
13794

13895
python3 -m pip install .
13996

140-
6. Run nanovna-saver in the nanovna-saver folder by:
97+
6. Run nanovna-saver folder by:
14198

142-
python3 nanovna-saver.py
99+
NanoVNASaver

docs/authors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.. _authors:
2-
.. include:: ../AUTHORS.rst
2+
.. include:: ../licenses/AUTHORS.rst

docs/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
License
55
=======
66

7-
.. include:: ../LICENSE.txt
7+
.. include:: ../licenses/LICENSE.txt

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ requires = [
7272
# build-backend = 'setuptools.build_meta'
7373
# in-tree build backend, wrapper around setuptools, just to run ui-compile task
7474
# See also https://setuptools.pypa.io/en/latest/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks
75-
build-backend = "setuptools_wrapper"
76-
backend-path = ["src/tools"]
75+
build-backend = "src.tools.setuptools_wrapper"
76+
backend-path = ["."]
7777

7878
[tool.setuptools.exclude-package-data]
7979
"*" = ['*.png', '*.ui', '*.qrc' ]

src/tools/setuptools_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
def compile_ui() -> None:
8-
protoc_call = ["python", "-m", "src.tools.ui_compile"]
8+
protoc_call = ["python3", "-m", "src.tools.ui_compile"]
99
subprocess.call(protoc_call)
1010

1111

0 commit comments

Comments
 (0)