DevelopersPython3Environment » History » Revision 11
« Previous |
Revision 11/21
(diff)
| Next »
Dan Smith, 02/15/2023 02:29 AM
Python 3 Developer Environment Setup¶
- Table of contents
- Python 3 Developer Environment Setup
Windows¶
Install Python¶
- Download and install from python.org. At the time of this writing, "Python 3.10.8" is recommended. During install note these options:
- Choose Add python.exe to PATH
- Choose Disable path length limit
- In Windows settings, search "Manage app execution aliases" and:
- Disable App Installer: python.exe
- Disable App Installer: python3.exe
- Disable App Installer: python3.7.exe
- Browse in explorer to
%AppData%\Local\Programs\Python\Python310
and copypython.exe
topython3.exe
Install Git¶
- Download and install from git-scm.org. During installation take the defaults except for:
- Configuring the line ending conversions: choose Checkout as-is, commit Unix-style line endings
Configure Git¶
From a command line:
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com"
- Optional, if you want to set an editor:
git config --global core.editor "PATH TO EDITOR"
Clone the chirp git repository (master branch)¶
From a command line:
C:\Users\{user}\Documents> git clone https://github.com/kk7ds/chirp
C:\Users\{user}\Documents> cd chirp
Install the python dependencies¶
python3 -m pip install -r requirements.txt
python3 -m pip install tox
Optional, but recommended: Install GitHub CLI¶
Via winget: winget install --id GitHub.cli
or manually from github.com
Note: {user} as shown in paths above is the logged in Windows user
Note: The steps above were done on Windows 10 Pro, version 22H2
MacOS¶
Install command-line tools¶
$ xcode-select --install
Clone the chirp git repository¶
$ git clone https://github.com/kk7ds/chirp
$ cd chirp
Install python requirements¶
$ python3 -m pip install -r requirements.txt
$ python3 -m pip install tox
(Note that tox
is only needed for running tests, not for running chirp itself)
Run chirp¶
$ ./chirpwx.py
Linux¶
These instructions are for Debian/Ubuntu, but should be generally applicable to other distros, possibly with different package names. You can use all distro packages (recommended), or install the python requirements with pip install -r requirements.txt
but you probably want to get wxPython from distro packages.
Install packages¶
$ sudo apt install git python3-wxgtk4.0 python3-serial python3-six python3-future python3-requests python3-pip
$ python3 -m pip install tox
(Note that tox
is only needed for running tests, not for running chirp itself)
Clone the chirp git repository¶
$ git clone https://github.com/kk7ds/chirp
Run chirp¶
$ cd chirp
$ ./chirpwx.py
Running tests¶
Below are some examples for running tests using tox. This is required to pass the CI checks on submissions before things can be merged.
Running everything:
$ tox
Running just style checks:
$ tox -e style
Running just driver tests for only drivers with changes since origin/master
:
$ tox -e fast-driver
Running just one driver test by module name:
$ tox -e driver -- -k ic2820
Running all driver tests for a given vendor:
$ tox -e driver -- -k Icom
Updated by Dan Smith almost 2 years ago · 11 revisions