repository for casafeather app
Source
xxxxxxxxxx
## Check Out
You should checkout CASAfeather with:
```
-bash-4.2$ git clone --recursive https://open-bitbucket.nrao.edu/scm/casa/casafeather.git
```
## Building
CASAfeather requires Qt 4.8 or later. Check which version of Qt is available using ```which```:
CASAfeather requires Qt 4.8 or later. One can check the correct version:
```
-bash-4.2$ which qmake
/usr/lib64/qt-3.3/bin/qmake
-bash-4.2$ PATH=/usr/lib64/qt4/bin:$PATH
-bash-4.2$ which qmake
/usr/lib64/qt4/bin/qmake
-bash-4.2$
```
In addition, the ```casatools``` Python module is required for building and the ```casatasks``` Python module is required for starting CASAfeather from the python prompt. You can check by attempting to get help from the ```casatools``` module:
-bash-4.2$ $ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64
```
-bash-4.2$ python3 -m casatools --help
/opt/rh/rh-python36/root/usr/bin/python3: No module named casatools
-bash-4.2$ PYTHONPATH=../casa6/casatools/build/lib.linux-x86_64-3.6 python3 -m casatools --help
--compiler-cc path to C compiler used to build casatools
--compiler-cxx path to C++ compiler used to build casatools
--compiler-xml path to compiler used to generate bindings from XML
--grpc-compile flags to compile C++ source files
--grpc-link flags to use to link gRPC C++ applications
--grpc-libpath path to gRPC C++ libraries
--grpc-protocpp path to C++ protoc compiler
--grpc-protopy path to Python protoc compiler
--proto-registrar path to registrar protobuf spec
--proto-shutdown path to shutdown protobuf spec
--proto-ping path to ping protobuf spec
-bash-4.2$
```
If you had to set ```PYTHONPATH``` environment variable, you need to also set it similarily when running qmake in the following. You should be able to build CASAfeaather on both OSX and Linux with:
Then build casafeather, first generating the `Makefile` and then running `make`:
```
-bash-4.2$ PYTHONPATH=../casa6/casatools/build/lib.linux-x86_64-3.6 qmake
-bash-4.2$ qmake
-bash-4.2$ make
```
This process should result in the creation of an [AppImage](https://appimage.org/) which can be run directly:
```
-bash-4.2$ ls build/bin.3.10.0-1160.31.1.el7.x86_64/casafeather-x86_64.AppImage
build/bin.3.10.0-1160.31.1.el7.x86_64/casafeather-x86_64.AppImage
-bash-4.2$ build/bin.3.10.0-1160.31.1.el7.x86_64/casafeather-x86_64.AppImage
...
-bash-4.2$
```
This AppImage could be distributed for use as is by just copying it to any desired location. It is also possible to build a Python binding for CASAfeather. The ```casatools``` module is also required for this step:
This AppImage could be distributed for use as is by just copying it to any desired location. It is also possible to build a Python binding for CASAfeather.
```
-bash-4.2$ PYTHONPATH=../casa6/casatools/build/lib.linux-x86_64-3.6 make py
-bash-4.2$ make py
```
This should result in a Python module which could be added to ```PYTHONPATH``` directly and a [PyPI](https://pypi.org/) wheel that can be installed with [pip](https://pypi.org/project/pip/):
```
-bash-4.2$ ls build/python.3.10.0-1160.31.1.el7.x86_64/casafeather
__bin__ casafeather.py __init__.py __main__.py private __pycache__
-bash-4.2$ ls build/python.3.10.0-1160.31.1.el7.x86_64/dist/
casafeather-0.0.0+dirty-py3-none-linux_x86_64.whl
```
If the ```casafeather``` wheel is installed, it should install its dependencies. These include:
* casatools -- CASA tools and configuration
* casatasks -- CASA tasks
* grpcio -- [gRPC](https://grpc.io/) binding for Python
* protobuf -- transport layer for gRPC
If the ```casafeather``` is loaded directly, all of these modules must be available in your ```PYTHONPATH```. If you have the CASA development environment, these packages should be installed with as part of the ```casa-toolset-3``` RPM.