Hi @metadata
Your thread nudged me to pick up on setting up a build environment which I attempted last year with some success, but did not complete. Today I picked up again and so far what I have is a basic setup where I can fetch code, install dependencies, setup the build and run gramps -v
successfully. Iâm on Windows 10 (21H2) with WSL2 so I wasnât able to run the Gramps graphically, but itâs a start. If someone has Windows 11 Gramps should be able to run at this point.
Suggested prep:
Details are probably missing so feel free to add/correct the steps. Steps 7-9 are definitely not very clear as I had a previous setup and did not document everything I did.
- Clone Gramps repo on Windows, say to C:\Dev\Source\Gramps\gramps
- Fire up WSL Ubuntu shell
- cd /mnt/c/Dev/Source/Gramps/gramps
- Invoke VS Code: code .
- Install Python extension in WSL Ubuntu and reload. This will also install Pylance extension in WSL Ubuntu
- VSCode will ask to choose a Python interpreter from Ubuntu (2.7.x or 3.6.9) but itâs better to set up a virtual environment specific to Gramps
- Create a venv for gramps, e.g. in ~/pyvenv/gramps-venv
- Configure VSCode to look at your virtual environment folder: âpython.venvPathâ: â~/pyvenvâ
- Now open gramps project with a python file open and choose the gramps-venv as the python environment.
- Follow instructions on Running a development version of Gramps.
- Failed installing gramps build-dep on Ubuntu 20.04:
$ sudo apt-get build-dep gramps
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
While this was discussed in another thread recently, I used the following workaround: Found build-deps for gramps (5.1.3) and installed each package listed in Build-Depends-Indep
list, e.g. sudo apt-get install dh-python gettext intltool
etc.
$ python3 setup.py build
âŚ
Ran into one error âmsgfmt: cannot locate ITS rules forâŚâ, and found solution on the web. Fix was to install appstream: sudo apt-get install appstream
Finally able to run:
$ python3 setup.py build
âŚran successfullyâŚ
$ python3 Gramps.py
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Gramps Settings:
python : 3.8.10
gramps : 5.2.0-ebddc51fa
gtk++ : 3.24.20
pygobject : 3.36.0
pango : 1.44.7
cairo : 1.16.0
pycairo : 1.16.2
osmgpsmap : 1.0
GExiv2 : 0.10
ICU : 66.1
PyICU : 2.4.2
o.s. : linux
kernel : 4.4.0-19041-Microsoft
Environment settings:
LANG : en_US.UTF-8
LANGUAGE : en
GRAMPSI18N: not set
GRAMPSHOME: not set
GRAMPSDIR : not set
GRAMPS_RESOURCES : /mnt/c/Dev/Source/Gramps/gramps
PYTHONPATH:
/mnt/c/Dev/Source/Gramps/gramps/gramps
/mnt/c/Dev/Source/Gramps/gramps
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
Non-Python dependencies:
Graphviz : 2.43
Ghostscr. : Ghostscript not in system PATH
System PATH env variable:
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
...
/snap/bin
Databases:
bsddb :
version : 6.2.7
db version : 5.3.28
location : /usr/lib/python3/dist-packages/bsddb3/__init__.py
sqlite3 :
version : 3.31.1
py version : 2.6.0
location : /usr/lib/python3.8/sqlite3/__init__.py