You may have paid lots of efforts in your experiment processes, and they are significant ideas in your research. You may want to accumulate these ideas for future usage, or you may need to protect it before sharing them to your colleagues or other research cooperators.
We will use the lunar reflectance spectra analysis example to show how easy to package your experiment processes with the help of sigclear-develop.
Package lunarspec.py
- create a folder for the package coding project, such as ~/pack-example/:
- mkdir ~/pack-example
- cd ~/pack-example
- copy the file lunarspec.py into ~/pack-example/.
- choose a name for your package, such as sigclear-lunarspec, and create a SConstruct script for package building as follows
- build the package
- scons package
- You can add more python files for experiment analysis or C files for processing methods in ~/pack-example/. They will be automatically compiled and packed into the package.
from program import *
SGBuild("sigclear-lunarspec")
It will generate a lunarspec.pyc file,
and produce a .rpm package under CentOS
or a .deb package under debian.
You can install this package by standard yum or apt tools.
After install the package, you can call the defined functions
in any experiments without copy lunarspec.py there.
Please be free to share the package to your cooperators or distribute it to public by adding it into a linux package repository. The package only includes the compiled .pyc file instead of .py source code. Users can install and use the defined functions in lunarspec.py, but they can not learn the detail implement of your idea.
References:
- Learn more about lunar reflectance spectra analysis
- download the package in this example pack-example.tar.gz
- yum manual
- apt manual