Prerequisites PyDECnet requires Python 3.7 or later. The Python.org website indicates that versions 3.7 and earlier are now (as of July 2023) no longer supported. The current release of PyDECnet has been tested with Python 3.7 through 3.12 and with 3.13 beta 2 including the "free threading" version. Version 3.8 or later is recommended; some features are not available with version 3.7. PyDECnet requires only modules that are part of the standard Python library. PyDECnet can also use the following optional modules: 1. python-daemon: if present, the --daemon command line option is available. 2. PyYAML: if present, the logging configuration file specified by the --log-config command line option can be a YAML file. If not, only JSON configuration files are supported. 3. python-pam: if present, username/password authentication for DECnet objects is available. 4. pyserial: if present, the "serial" mode of the DDCMP datalink is available. You can check what optional libraries are installed using this command: pip3 list Installation Installation from the kit Kits can be found on the DECnet/Python download page, which is maintained on the HECnet map server: http://akdesign.dyndns.org:8080/resources/public/index.html The simplest installation is the "binary" kit, a "whl" file, which can be directly installed by the "pip" utility. You can point it at the URL of the kit on the download server, or download it first and point "pip" at the downloaded file. For example: pip3 install http://akdesign.dyndns.org:8080/resources/public/decnet-1.0.596-py3-none-any.whl Python "virtual environment" Python supports the notion of a "virtual environment" which is a lightweight way of separating custom configurations from each other and from the regular system installation. With recent versions of Python (e.g., 3.12) private packages cannot be installed in the Python provided as part of the operating system or applications packaging (Linux distributions, or Mac OS packaging systems like Homebrew). Instead, these require any optional library modules to be installed from packager-supplied kits, wich of course is not an option for PyDECnet. The supported and recommended way to handle this situation is to create a "virtual environment" from the Python version to be used, and then install PyDECnet as well as any desired optional modules in that virtual environment. For example: python3.12 -m venv /usr/local/decnet-venv /usr/local/decnet-venv/bin/pip install python-daemon python-pam /usr/local/decnet-venv/bin/pip install http://akdesign.dyndns.org:8080/resources/public/decnet-1.0.596-py3-none-any.whl PyDECnet can then be started by executing /usr/local/decnet-venv/bin/pydecnet. Installation from the Github repository You can get the current code using the Git tool, from the pydecnet repository on Github: git clone https://github.com/pkoning2/pydecnet.git You can then install from the resulting working directory: cd pydecnet python3 setup.py install Note: if you have done this before, depending on tool versions you may end up with a broken "pydecnet" command, one that reports "Entry point ... not found" at startup. If so, remove the decnet.egg-info directory and repeat the operation. If you still have problems, you can create a source kit and install from that: python3 setup.py sdist pip3 install dist/decnet-1.0.tar.gz Running directly from the Git working directory If you want to run the current code in the working directory, without having to go through a reinstall each time there is a change, you need this command: python3 setup develop That will create the "pydecnet" script in your default binary directory (typically /usr/local/bin on Linux systems, a suitable /Library/Frameworks directory on Mac OS) and a link to the Python modules in the Git working directory. You can then invoke the "pydecnet" command to start the current code. Unit test PyDECnet comes with a unit test collection. This is mostly for development use, but feel free to use it. You will need the full sources (source kit or Git working directory), not the binary kit. After unpacking the sources, the tests are invoked this way: cd pydecnet python3 -m unittest where "pydecnet" is the Git working directory or the top level directory of the unpacked source tar archive, according to which you used to get PyDECnet. You can specify a particular Python 3.x to run the unit test collection against that particular Python release. The optional modules are optional for test as well, but tests that exercise one of these will be skipped if the necessary optional component is not installed. The PyDECnet unit tests are built using the Python standard library module "unittest". For more information on how that works, including other commands to invoke it to run selected tests or get more verbose output, refer to the Python library manual. A full unit test run takes about 2 minutes on a fast machine. System exerciser Included in the unit test directory but not run as part of the unit test suite described above is a test that creates a simulated network of 15 PyDECnet nodes of various types and with various connections among them. It then starts up that entire network and runs a variety of tests. At the moment they are: (1) read all the HTTP status pages, (2) run data tests among 20 randomly chosen pairs of those 15 nodes. This delivers a basic check of operation of whole PyDECnet nodes, as opposed to the unit tests which check just one layer or code component at a time in isolation. To run the exerciser, simply pass the script to Python. You may use a specific version of Python 3 if desired, but Python 3.8 is required. The "aiohttp" package is recommended; without it the HTTP page test is skipped. cd pydecnet python3 tests/systemtest.py A system exerciser run takes about 2 minutes.