repository for casafeather app
Source
6
6
7
7
## Check Out
8
8
9
9
You should checkout CASAfeather with:
10
10
```
11
11
-bash-4.2$ git clone --recursive https://open-bitbucket.nrao.edu/scm/casa/casafeather.git
12
12
```
13
13
14
14
## Building
15
15
16
-
CASAfeather requires Qt 4.8 or later. Check which version of Qt is available using ```which```:
16
+
CASAfeather requires Qt 4.8 or later. One can check the correct version:
17
17
```
18
18
-bash-4.2$ which qmake
19
-
/usr/lib64/qt-3.3/bin/qmake
20
-
-bash-4.2$ PATH=/usr/lib64/qt4/bin:$PATH
21
-
-bash-4.2$ which qmake
22
19
/usr/lib64/qt4/bin/qmake
23
-
-bash-4.2$
24
-
```
25
-
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:
20
+
-bash-4.2$ $ qmake --version
21
+
QMake version 2.01a
22
+
Using Qt version 4.8.7 in /usr/lib64
26
23
```
27
-
-bash-4.2$ python3 -m casatools --help
28
-
/opt/rh/rh-python36/root/usr/bin/python3: No module named casatools
29
-
-bash-4.2$ PYTHONPATH=../casa6/casatools/build/lib.linux-x86_64-3.6 python3 -m casatools --help
30
-
--compiler-cc path to C compiler used to build casatools
31
-
--compiler-cxx path to C++ compiler used to build casatools
32
-
--compiler-xml path to compiler used to generate bindings from XML
33
-
--grpc-compile flags to compile C++ source files
34
-
--grpc-link flags to use to link gRPC C++ applications
35
-
--grpc-libpath path to gRPC C++ libraries
36
-
--grpc-protocpp path to C++ protoc compiler
37
-
--grpc-protopy path to Python protoc compiler
38
-
--proto-registrar path to registrar protobuf spec
39
-
--proto-shutdown path to shutdown protobuf spec
40
-
--proto-ping path to ping protobuf spec
41
-
-bash-4.2$
42
-
```
43
-
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:
24
+
Then build casafeather, first generating the `Makefile` and then running `make`:
44
25
```
45
-
-bash-4.2$ PYTHONPATH=../casa6/casatools/build/lib.linux-x86_64-3.6 qmake
26
+
-bash-4.2$ qmake
46
27
-bash-4.2$ make
47
28
```
48
29
This process should result in the creation of an [AppImage](https://appimage.org/) which can be run directly:
49
30
```
50
31
-bash-4.2$ ls build/bin.3.10.0-1160.31.1.el7.x86_64/casafeather-x86_64.AppImage
51
32
build/bin.3.10.0-1160.31.1.el7.x86_64/casafeather-x86_64.AppImage
52
33
-bash-4.2$ build/bin.3.10.0-1160.31.1.el7.x86_64/casafeather-x86_64.AppImage
53
34
...
54
35
-bash-4.2$
55
36
```
56
-
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:
37
+
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.
57
38
```
58
-
-bash-4.2$ PYTHONPATH=../casa6/casatools/build/lib.linux-x86_64-3.6 make py
39
+
-bash-4.2$ make py
59
40
```
60
41
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/):
61
42
```
62
43
-bash-4.2$ ls build/python.3.10.0-1160.31.1.el7.x86_64/casafeather
63
44
__bin__ casafeather.py __init__.py __main__.py private __pycache__
64
45
-bash-4.2$ ls build/python.3.10.0-1160.31.1.el7.x86_64/dist/
65
46
casafeather-0.0.0+dirty-py3-none-linux_x86_64.whl
66
47
```
67
-
If the ```casafeather``` wheel is installed, it should install its dependencies. These include:
68
-
* casatools -- CASA tools and configuration
69
-
* casatasks -- CASA tasks
70
-
* grpcio -- [gRPC](https://grpc.io/) binding for Python
71
-
* protobuf -- transport layer for gRPC
72
-
73
-
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.