This is an experimental project, and likely to change. Why does it exist? I am hoping to get more people involved in the development of gramps-web (including me!), and wanted to make it easy to use.
If you want to share your family tree with others, youβll want to use gramps-web-api directly.
Feedback, ideas welcomed!
[Thanks for @DavidMStraub for all of the work on gramps-web, and willingness to accept changes!]
My attempts at installation on both Windows and MSYS2 MINGW64 on Windows failed in the step which installs PyGObject. I almost expect this to fail on Windows, but I thought MSYS2 might succeed. The logs after the initial failure summary are long, can I share them with you offline?
@dsblank, I tried installing it in a venv (is that advisable?) and got some error about pycairo (I think β I donβt understand all of it). This is on debian (on a Chromebook), where I already have Gramps installed, which is why I thought of using a venv.
Γ pip subprocess to install build dependencies did not run successfully.
β exit code: 1
β°β> [77 lines of output]
Collecting meson-python>=0.12.1
Downloading meson_python-0.17.1-py3-none-any.whl (27 kB)
Collecting pycairo>=1.16
Downloading pycairo-1.27.0.tar.gz (661 kB)
βββββββββββββββββββββββββββββββββββββββ 661.5/661.5 kB 3.5 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status βdoneβ
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status βdoneβ
Installing backend dependencies: started
Installing backend dependencies: finished with status βdoneβ
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status βerrorβ
error: subprocess-exited-with-error
Γ Preparing metadata (pyproject.toml) did not run successfully.
β exit code: 1
β°β> [49 lines of output]
+ meson setup /tmp/pip-install-espm7cte/pycairo_46a220b660c440df8e5ea051feeb5c06 /tmp/pip-install-espm7cte/pycairo_46a220b660c440df8e5ea051feeb5c06/.mesonpy-fdrv8jj3 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dtests=false --native-file=/tmp/pip-install-espm7cte/pycairo_46a220b660c440df8e5ea051feeb5c06/.mesonpy-fdrv8jj3/meson-python-native-file.ini
The Meson build system
Version: 1.6.0
Source dir: /tmp/pip-install-espm7cte/pycairo_46a220b660c440df8e5ea051feeb5c06
Build dir: /tmp/pip-install-espm7cte/pycairo_46a220b660c440df8e5ea051feeb5c06/.mesonpy-fdrv8jj3
Build type: native build
Project name: pycairo
Project version: 1.27.0
C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/home/georgewilmes/gwd/bin/python3)
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Warray-bounds: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wconversion: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wimplicit-function-declaration: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Winline: YES
Compiler for C supports arguments -Wmissing-format-attribute: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpacked: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wreturn-type: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-aliasing: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wunused-but-set-variable: YES
Compiler for C supports arguments -Wswitch-default: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -fno-strict-aliasing: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency cairo found: NO (tried pkgconfig)
../cairo/meson.build:31:12: ERROR: Dependency "cairo" not found, tried pkgconfig
A full log can be found at /tmp/pip-install-espm7cte/pycairo_46a220b660c440df8e5ea051feeb5c06/.mesonpy-fdrv8jj3/meson-logs/meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Γ Encountered error while generating package metadata.
β°β> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Γ pip subprocess to install build dependencies did not run successfully.
β exit code: 1
β°β> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I couldnβt tell if it expected an ID, the name (in which format), needed the full name or a partial. But I looked in the Number of people statistics on the Gramps Web Home Page and tried the info from one of the 42 people in tree. Nothing worked.
First, Iβm working in a venv too. For cairo and the subsequent errors the package installations below worked for me on Ubuntu. Basically you and I might have had runtimes installed, but not the dev libraries and other dependencies that GWD needs.
Thanks @codefarmer, Iβve done all that now but still have a problem.
When I run the gwd command without parameters, it lists my available trees, as expected. But when I try to run it specifying one of those trees (as well as a username and password, as required), it says it canβt find it:
FileNotFoundError: [Errno 2] No such file or directory: β~/.gramps/grampsdb/64fdc4dcβ
Thanks all for trying this out! I see that I need to understand what pip install gramps gramps-web-api does (and doesnβt) install, and what are the minimum requirements. Iβll keep working on this if you find the idea useful.
@DavidMStraub, how could we make a dependency list for gramps-web-api that was designed for local use, without include unwanted things, like postgresql and redis? And why is the GUI part of gramps needed?
Here is the currently list of gramps-web-api requirements:
I used the human-friendly name, following the example provided. There are no spaces in the name of the tree, but I tried it with and without quotes anyway (single and double).
That sounds like a good idea for gramps-web, but not for this desktop version, right? This isnβt designed for access outside the local enviroment. Or did I misunderstand?
Exactly, and we have to make that very clear - if somebody manages to expose it via the internet because it βjust worksβ, it would be dangerous.
Concerning dependencies: a problem is that Gramps core still doesnβt fully separate between GUI and non-GUI parts, there are some PyGObject imports in gramps.gen if I recall correctly. Also, some of the reports need Pycairo.
Our setup.py divides the Gramps packages into core and gui. When I wrote the code we were discussing the possibility of publishing a gramps-core and gramps-gui package instead of a single gramps package. The idea wasnβt progressed beyond this stage.
Benny Malengier posted a Blog entry 19 Jun 2009 about having made the Gramps engine run (well⦠hobble along) as a standalone CLI application without GTK libraries.
Yes, I remember that work, and constructing a User() instance that is either for the CLI, or for the GUI. But as far as I know, the ability to just import gramps includes some GUI stuff, and breaks more general usage of the code base.