From 12e7103a96ca125a8d4523c423081e335673af75 Mon Sep 17 00:00:00 2001 From: scriptorron <22291722+scriptorron@users.noreply.github.com> Date: Fri, 3 May 2024 13:58:38 +0200 Subject: [PATCH] changed installation instructions; version 2.6.2 --- CHANGELOG | 7 ++++ README.md | 42 +++++++++++++---------- build.sh | 2 +- setup.cfg | 6 ++-- src/indi_pylibcamera/__init__.py | 2 +- src/indi_pylibcamera/indi_pylibcamera.xml | 2 +- 6 files changed, 37 insertions(+), 24 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e5b2781..f597a99 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +2.6.2 +- fixed ROWORDER attribute in FITS files (KStars/EKOS ignores this but some postprocessing tools need this fix to + have the Bayer pattern in the correct order) +- more details in install_requires of the wheel +- adapted install instructions in README.md to meet newer OS versions (installation in virtual environment) +- removed indi_pylibcamera_postinstall from installation: does not work from virtual environment + 2.6.0 - support for monochrome cameras - support for new raw and RGB frame formats (including monochrome) diff --git a/README.md b/README.md index e1c2cc1..0d688ed 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ camera. ## Requirements and installation Some packages need to be installed with apt-get: -- `libcamera` (if not already installed). You can test libcamera and the support +- `libcamera` and `libcamera-apps` (if not already installed). You can test libcamera and the support for your camera with: ```commandline libcamera-hello --list-cameras @@ -52,36 +52,42 @@ for your camera with: by yourself. Instructions can be found here: https://github.com/indilib/indi. A Raspberry Pi Zero does not have enough RAM to compile with 4 threads in parallel: you need to do `make -j1` instead of `make -j4`. Finally, after installation, you need to have a working INDI server: `indiserver -v indi_simulator_telescope` -- The Python packages `picamera2`, `numpy`, `lxml` and `astropy`. Theoretically these packages can be installed with `pip`. -But at least the version of `picamera2` must fit to the `libcamera` you installed with `apt-get`. Therefore it is -safer to install these Python packages with `apt-get` too. - -The command line to install all is: +- The Python packages `PyQt5`, `picamera2` and `numpy` must be installed with `apt-get`. Typically they are already +installed. If not you can install them with: ```commandline -sudo apt-get install libcamera-apps indi-bin python3-picamera2 python3-lxml python3-astropy python3-numpy +sudo apt-get install python3-picamera2 python3-pyqt5 python3-numpy ``` -The `indi_pylibcamera` driver package is available on PyPi. Please install with: +The Raspberry PI OS requires a virtual environment to install non-system Python packages. Trying to install +`indi_pylibcamera` without a virtual environment will fail with `error: externally-managed-environment`. + +Run the following on a command line to install `indi_pylibcamera`in a virtual environment called `venv_indi_pylibcamera`: ```commandline -sudo pip3 install indi_pylibcamera -sudo indi_pylibcamera_postinstall +python3 -m venv --system-site-packages ~/venv_indi_pylibcamera +source ~/venv_indi_pylibcamera/bin/activate +pip install --upgrade pip +pip install indi_pylibcamera ``` -The `indi_pylibcamera_postinstall` script creates in `/usr/share/indi` a symbolic link to the driver XML. That makes -the driver available in the KStars/EKOS profile editor in "CCD"->"OTHERS". Not all versions ov KStars/ECOS support this -(for instance it works with KStars 3.6.5 but not with KStars 3.4.3). - ## Uninstall For uninstalling the driver do: ```commandline sudo rm -f /usr/share/indi/indi_pylibcamera.xml -sudo pip3 uninstall indi_pylibcamera +rm -rf ~/venv_indi_pylibcamera ``` ## Running -You can start the INDI server with `indiserver -v indi_pylibcamera`. When the server is running you can connect to -the server from another computer with an INDI client (for instance KStars/EKOS). The camera name is the one -you configure in `indi_pylibcamera.ini`. +At the moment there is no support to start the driver from the EKOS profile editor. +The driver and the indi server must be started in shell with activated virtual environment: +```commandline +source ~/venv_indi_pylibcamera/bin/activate +``` + +In the same shell you can start the INDI server with `indiserver -v indi_pylibcamera`. When the server is running +you can connect to the server from another computer with an INDI client (for instance KStars/EKOS). The camera name +is the one you configure in `indi_pylibcamera.ini`. + +I recommend you to make a wrapper script to activate the environment and start the driver. ## Global Configuration The driver uses a hierarchy of configuration files to set global parameter. These configuration files are loaded in the diff --git a/build.sh b/build.sh index bd04f2c..9683528 100755 --- a/build.sh +++ b/build.sh @@ -26,7 +26,7 @@ twine check dist/* # after upload the package will be visible in https://test.pypi.org/project/indi_pylibcamera # to test the pip installation from TestPyPi: # - USE APT_GET TO INSTALL REQUIREMENTS! -# sudo apt-get install indi-bin python3-picamera2 python3-lxml python3-astropy +# sudo apt-get install indi-bin python3-picamera2 python3-lxml # - install in virtual environment # python3 -m venv --system-site-packages /home/cam/test_iplc # source test_iplc/bin/activate diff --git a/setup.cfg b/setup.cfg index 8746412..ae7df11 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,9 +16,9 @@ packages = find: include_package_data = True python_requires = >=3.7 install_requires = - picamera2 - lxml - astropy + numpy>=1.24 + astropy>=5.2 + picamera2>=0.3 [options.packages.find] where=src diff --git a/src/indi_pylibcamera/__init__.py b/src/indi_pylibcamera/__init__.py index 3137068..969625d 100644 --- a/src/indi_pylibcamera/__init__.py +++ b/src/indi_pylibcamera/__init__.py @@ -2,4 +2,4 @@ INDI driver for libcamera supported cameras """ -__version__ = "2.6.0" +__version__ = "2.6.2" diff --git a/src/indi_pylibcamera/indi_pylibcamera.xml b/src/indi_pylibcamera/indi_pylibcamera.xml index e0ffefb..8b5f03d 100644 --- a/src/indi_pylibcamera/indi_pylibcamera.xml +++ b/src/indi_pylibcamera/indi_pylibcamera.xml @@ -2,7 +2,7 @@ indi_pylibcamera - 2.6.0 + 2.6.2