updated the documentation for "setup from source"
I've added a few experiences that I had on my adventures
with my new toy, a Raspberry Pi 400.
@@ -72,8 +72,8 @@ Install the latest development version by ``pip3`` from GitHub::
Build and Install from Source
-----------------------------
-Make a build directory and a virtual environment and sorry,
-I am working on Windows::
+Make a build directory and a virtual environment and I'm sorry, but I mostly
+use Windows for work::
mkdir build
cd build
@@ -97,16 +97,33 @@ Install required packages to build and install ezdxf with C-extensions::
Linux Requirements
++++++++++++++++++
+I got a Raspberry Pi 400 for testing `ezdxf` on ARM64 hardware and I use
+sometimes the Windows Subsystem for Linux (WSL2) with Ubuntu for some tests.
+
Install python packages on Linux from the distribution repository if
-available by the system packager, ``apt`` in the case of Ubuntu::
+available by the system packager, `apt` in the case of Debian based
+distributions like Raspberry Pi OS or Ubuntu::
+
+ sudo apt install python3-pip python3-wheel
+
+Create the venv with access to the system site-packages for using `Matplotlib`
+and the Qt bindings from the system installation, see `Install Optional Packages`_::
- sudo apt install python3-pip python3-wheel cython3 python3-pytest
+ python3 -m venv --system-site-packages py37
+ source py37\bin\activate
By doing as fresh install on WSL2 & Ubuntu, I encountered an additional
requirement, the ``build-essential`` package adds the required C++ support::
sudo apt install build-essential
+Installation from Source
+++++++++++++++++++++++++
+
+Install Cython in the venv to got the C-extensions compiled::
+
+ pip3 install cython
+
Clone the GitHub repository::
git clone https://github.com/mozman/ezdxf.git
@@ -116,20 +133,39 @@ Build and install ezdxf from source code::
cd ezdxf
pip3 install .
+Check if the installation was successful::
+
+ ezdxf -V
+
+The output should look like this::
+
+ ezdxf 0.17.2b4 from <path to your venv>
+ Python version: 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]
+ using C-extensions: yes
+ using Matplotlib: yes <after installing Matplotlib!>
+
Install the test dependencies and run the tests::
pip3 install pytest geomdl
- pytest tests integration_tests
+ python3 -m pytest tests integration_tests
+
+Install Optional Packages
++++++++++++++++++++++++++
-Install optional dependencies to use all features, like the drawing add-on
+Install optional dependencies on Windows by `pip` to use all features, like the
+drawing add-on::
pip3 install matplotlib PySide6
-On Linux use the system packager! ``PySide6`` wasn't available for Ubuntu at
-the time of writing this, but ``PyQt5`` is supported as fallback::
+On Linux install `Matplotlib` and the `PyQt5` bindings also by the system
+packager, an installation by `pip` in the venv worked, but the packages showed
+errors at import on the Raspberry Pi::
sudo apt install python3-matplotlib python3-pyqt5
+`PySide6` is the preferred Qt binding but wasn't available on the Debian based
+distributions at the time of writing this - `PyQt5` is supported as fallback.
+
Build Documentation
-------------------
@@ -143,6 +179,6 @@ Install Sphinx::
Build the HTML documentation::
cd docs
- make.bat html
+ make html
The output is located in ``build\ezdxf\docs\build\html``.
