Changes

Jump to: navigation, search

Brief introduction to SVN

2,561 bytes added, 19:22, 30 September 2012
m
Run the development version
=== Run the development version ===
As you should not install the development version, how can you try it out? The current Python version required to run Gramps trunk is officially python2.6 7 as of July 20102012. Easy  ==== Option 1: run from source repo ====Here, just type we use the code in <code>trunk</code> directory to run Gramps. This means that compiled python files will be stored there. This is not ideal, but the easiest way to develop Gramps, as changes are immediately picked up by the code. Copy the following const.py file created in build to your source directory if you want to use your source directory to work with Gramps: cp build/lib.linux-x86_64-2.7/gramps/gen/const.py gramps/gen/const.py python Gramps.py That is it. If you installed some dependencies of Gramps in non-default positions, you need to indicate with PYTHONPATH where then can be found, and with LD_LIBRARY_PATH where link libraries can be found. Eg, if you install GTK and spell checking from source too, you will need something like: PYTHONPATH=/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python Gramps.py ==== Option 2: use the build code ====Here, we use the code build in <code>trunk/build</code> directoryto run Gramps. For compiled programs this is the only way, but for Gramps nothing is compiled. It is not bad however to keep your code separated from your execution, as deleting the build directory is easy. After a code change in your source, you then need to run however <code>python setup.py</code> again to update the build direcotry. To run Gramps from build, do cd trunk/build/lib.linux-x86_64-2.7/ python -c 'from gramps.grampsapp import main; main()' Again, it might be needed to set with PYTHONPATH where dependencies can be found, and with LD_LIBRARY_PATH link libraries, see option 1. If you point your PYTHONPATH to the build directory, you can actually run Gramps from a random directory. Like this:  cd PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/ python src-c 'from gramps.grampsapp import main; main()' So, more general: cd PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/:/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python -c 'from gramps.grampsapp import main; main()' If the build directory is in your PYTHONPATH, you can also just execute the grampsapp.pymodule. So this will work too: cd ~/gramps-trunk/build/lib.linux-x86_64-2.7/gramps PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/ python grampsapp.py oragain more generally PYTHONPATH=~/gramps-trunk/build/lib.linux-x86_64-2.7/:/usr/local/lib/python2.6 src7/grampssite-packages/ LD_LIBRARY_PATH=/usr/local/lib python grampsapp.py '''Note''': at the time of writing, only the last, so using grampsapp.pyworks, as not all imports in Gramps have been converted to relative or absolute imports. This conversion will be finished by end of 2012 however.

Navigation menu