2008-03-11 10:55:18 +00:00
This file contains some useful details on the installation from source code
for GRAMPS. It does not cover installation of a pre-built binary package.
For that use your package manager, the rest is already done by the packager.
2009-04-22 02:40:18 +00:00
Uninstall old version
2009-03-07 20:11:58 +00:00
---------------------
2015-02-06 10:39:34 -08:00
If you do a source install in the same place as an existing install,
2009-03-14 11:57:35 +00:00
you need to remove the old version first. You can delete the old
2015-02-06 10:39:34 -08:00
version by deleting the installed directories. For example, if your installation prefix is /usr/local, remove the following:
/usr/local/share/gramps
2012-09-30 14:59:36 +00:00
/usr/local/lib/pythonx.x/site-packages/gramps
2015-02-06 10:39:34 -08:00
If you installed with a package manager you might instead need to remove
2012-11-10 10:14:55 +00:00
/usr/local/lib/pythonx.x/dist-packages/gramps
2015-02-06 10:39:34 -08:00
2015-02-28 17:57:00 +00:00
replacing pythonx.x with the python version you used, e.g. python3.4.
2015-02-06 10:39:34 -08:00
Also remove any gramps .egg files that are installed along with the gramps
2015-02-07 07:27:33 -08:00
directory and the file /usr/local/bin/gramps.
2012-09-30 14:59:36 +00:00
2013-03-09 17:48:22 +00:00
If you don't know the list of all files that Gramps installed, you can
reinstall it with the --record option, and take a look at the list this
produces (so python setup.py install --record grampsfiles.txt
2009-03-14 11:57:35 +00:00
GRAMPS is a python application, so loading happens on reading the
files, meaning that files of a previous version that are no longer
present in the new version can still be loaded, making the new install
2012-09-30 14:59:36 +00:00
unstable!
2008-03-11 10:55:18 +00:00
2012-09-30 14:59:36 +00:00
distutils install
-----------------
2015-02-06 13:57:02 -08:00
We do not check all dependencies of Gramps, see README for a list of
all required and optional dependencies. Missing dependencies will
result in runtime errors.
2012-09-30 14:59:36 +00:00
2015-02-06 13:57:02 -08:00
To build and install, whether from a tarball or git repo:
2012-09-30 14:59:36 +00:00
python setup.py build
2015-02-06 13:57:02 -08:00
sudo python setup.py install
You can avoid using sudo for the install step by specifying a prefix to which you have write priviledge. The default is /usr/local, which is usually owned by root. You can learn of more options with
python setup.py --help
2012-09-30 14:59:36 +00:00
2015-02-06 14:29:11 -08:00
One can use gramps from the command line without installing it by
setting the following environment variables, but that won't provide
things like MIME type and desktop entries.
export PYTHONPATH="/top/grampsdir/gramps:$PYTHONPATH"
export GRAMPS_RESOURCES="/top/grampsdir"
See below for ways to invoke Gramps.
2008-03-11 10:55:18 +00:00
2012-09-30 15:29:37 +00:00
Typical install directories in linux (ubuntu) are:
2015-02-28 17:57:00 +00:00
* /usr/local/lib/python3.4/dist-packages/gramps/ : the gramps python module
2012-09-30 15:29:37 +00:00
* /usr/local/share/mime-info : mime info so gramps opens files automatically
* /usr/local/share/icons/gnome : our icons
* /usr/local/share/doc/gramps : documentation, also example .gramps and .gedcom
* /usr/local/bin : the gramps executable
* /usr/local/share/locale/xx/LC_MESSAGES : xx language code, translation
* /usr/local/share/man/man1/xx/man1 : xx language code, man file
* /usr/local/share/mime
* /usr/local/share/mime-info
2012-09-30 15:35:31 +00:00
Running Gramps
2012-09-30 15:29:37 +00:00
--------------
Gramps is python only, so no compilation is needed, you can even run gramps
2015-02-06 11:35:55 -08:00
from the source directory.
2012-09-30 15:29:37 +00:00
2012-11-10 10:14:55 +00:00
a) You installed Gramps, then you can run it with the command
2015-02-06 11:35:55 -08:00
gramps
2012-11-10 10:14:55 +00:00
b) You installed Gramps, and want to start it from the PYTHONPATH. In this
case use the command:
2012-09-30 15:35:31 +00:00
python -c 'from gramps.grampsapp import main; main()'
2015-02-06 11:35:55 -08:00
The executable 'gramps' in /usr/local/bin or /usr/bin from a) does
2012-09-30 15:35:31 +00:00
this for you.
2012-11-10 10:14:55 +00:00
b) You downloaded the Gramps source code to a directory, and want to run it.
2014-02-19 22:02:42 +01:00
You can start Gramps from the source code directory with
2012-11-10 10:14:55 +00:00
2012-09-30 15:35:31 +00:00
python Gramps.py
2015-02-06 14:29:11 -08:00
See gramps/gen/const.py how Gramps finds its resource directories in case
2014-02-19 22:02:42 +01:00
you encounter problems.
2008-03-11 10:55:18 +00:00
2009-04-22 02:40:18 +00:00
Custom directory installation
-------------------------------------
2015-02-06 11:35:55 -08:00
If you would like to install GRAMPS without being root, or in an
2012-09-30 14:59:36 +00:00
alternative location on windows, supply the --root argument to setup.py
2009-04-22 02:40:18 +00:00
For example:
2012-09-30 14:59:36 +00:00
python setup.py install --root ~/test
2009-04-22 02:40:18 +00:00
or
2012-09-30 14:59:36 +00:00
python setup.py install --root ~/test --enable-packager-mode
2008-03-11 10:55:18 +00:00
2012-09-30 14:59:36 +00:00
The last option, --enable-packager-mode, is needed if you want to disable
2015-02-06 11:35:55 -08:00
execution of post-install mime processing. If you don't have root/admin
2012-11-10 10:14:55 +00:00
access, this will be needed
2008-03-11 10:55:18 +00:00
Packager's issues
------------------
2012-09-30 14:59:36 +00:00
There is a MANIFEST.in file to indicate the work needed.
To create a source distribution run:
2008-05-16 23:51:36 +00:00
2012-09-30 14:59:36 +00:00
python setup.py sdist