-
Notifications
You must be signed in to change notification settings - Fork 512
Expand file tree
/
Copy pathINSTALL
More file actions
111 lines (83 loc) · 4.36 KB
/
INSTALL
File metadata and controls
111 lines (83 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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.
Uninstall old version
---------------------
If you do a source install in the same place as an existing install,
you need to remove the old version first. You can delete the old
version by deleting the installed directories. For example, if your installation prefix is /usr/local, remove the following:
/usr/local/share/gramps
/usr/local/lib/pythonx.x/site-packages/gramps
If you installed with a package manager you might instead need to remove
/usr/local/lib/pythonx.x/dist-packages/gramps
replacing pythonx.x with the Python version you used, e.g. python3.5.
Also remove any gramps .egg files that are installed along with the Gramps
directory and the file /usr/local/bin/gramps.
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 pip install . --record grampsfiles.txt)
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
unstable!
Install
-----------------
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.
To install all needed dependencies you can use (in Ubuntu):
sudo apt-get build-dep gramps
To install use:
pip install .
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.
Typical install directories in linux (Ubuntu) are:
* /usr/local/bin : the Gramps executable
* /usr/local/lib/python3.10/dist-packages/gramps/ : the Gramps python module
* /usr/local/share/doc/gramps : documentation, also example .gramps and .gedcom
* /usr/local/share/gramps : data files
* /usr/local/share/gramps/images : our images
* /usr/local/share/gramps/css : css files
* /usr/local/share/icons/hicolor : application icons
* /usr/local/share/locale/xx/LC_MESSAGES : xx language code, translation
* /usr/local/share/man/xx/man1 : xx language code, man file
* /usr/local/share/applications : desktop entry
* /usr/local/share/mime/packages : mime info so Gramps opens files automatically
* /usr/local/share/metainfo : application metadata
Running Gramps
--------------
Gramps is Python only, so no compilation is needed, you can even run Gramps
from the source directory.
a) You installed Gramps, then you can run it with the command
gramps
b) You installed Gramps, and want to start it from the PYTHONPATH. In this
case use the command:
python -c 'from gramps.grampsapp import main; main()'
The executable 'gramps' in /usr/local/bin or /usr/bin from a) does
this for you.
c) You downloaded the Gramps source code to a directory, and want to run it.
You can start Gramps from the source code directory with
python Gramps.py
See gramps/gen/const.py how Gramps finds its resource directories in case
you encounter problems.
Custom directory installation
-------------------------------------
If you would like to install Gramps without being root, or in an
alternative location on Windows, supply the --root argument to pip install
For example:
sudo pip install . --root ~/test
You can avoid using sudo for the install step by specifying a prefix to which you have write privilege. The default is /usr/local, which is usually owned by root. You can learn of more options with
pip install --help
Packager's issues
------------------
There is a MANIFEST.in file to indicate the work needed.
To create a source distribution
pip install build
python -m build --sdist
This generates a sdist (.tar.gz).
You can install it with:
pip install dist/gramps-*.tar.gz