* for OSX
install gettext from  http://www.ellert.se/twain-sane/

* for windows
use preconfigured environment with python, kivy, and gettext
to prepare a dist clean local files:
cd python27/share/rmap
remove:
rmap.sqlite3
saveddata-service.pickle
cache
in lib/site-package/rmap
and rmap.ini 

7zip -> aggiungi all'archivio -> formato 7z -lzma2 -> crea archvio autoestraente


Upgrade in all system should be done with:

pip install --upgrade rmap

* to extract messages
django-admin makemessages --settings=rmap.settings -a

* to rebuild android package
rm rmap.sqlite3
./rmapctrl --syncdb
buildozer android release
./sign.sh

* to manually initialize a DB
python manage.py migrate --no-initial-data
python manage.py changepassword rmap

* how to use the last django in android
rm .buildozer/android/platform/python-for-android/recipes/django/recipe.sh
comment wsgiref in
.buildozer/android/platform/python-for-android/src/blacklist.txt

* dump data by natural keys
 python manage.py dumpdata --natural-foreign --natural-primary --format=json auth.user|json_reformat

for pip:
python setup.py distclean compilemessages sdist upload
(*.mo files in locale have to be distributed in source tarball)

install with:
rm -rf /tmp/pip-build-root/rmap/
pip -v install --upgrade  rmap


initialize DB

./rmapctrl --syncdb
./rmap-configure --wizard --lon=10 --lat=45 --height=5 --stationname=test --username=pat1 --password=1password --station_slug=ETH_fixed

Configure a station (wizard) by command line:
./rmap-configure --wizard --station_slug=ETH_fixed --board_slug=master_eth_fixed --height=100 --stationname=microduino-eth --username=user --password=password --server=rmap.cc --samplerate=5 --lat=44.69950 --lon=10.64555

Configure eth board
./rmap-configure --config_station --station_slug=ETH_fixed --board_slug=master_eth_fixed 


#obsolete notes:

* bug in plyer to patch:
https://www.bountysource.com/issues/7197528-overflowerror-python-int-too-large-to-convert-to-c-long-android-lollipop
you have to modify it in .buildozer dir
./android/platform/python-for-android/dist/rmap/python-install/lib/python2.7/site-packages/plyer/platforms/android/gps.py

* to use pyserial comment 
#lib-dynload/termios.so
in
./android/platform/python-for-android/src/blacklist.txt
./android/platform/python-for-android/dist/rmap/blacklist.txt

