Not sure that this is a valid issue. I tried to run the FamilySearch plugin on beta2 and it failed due to dependencies in the Mac version. If I manually install all of the dependencies into the package (since it is an AIO app), it works. If I just install from command line it does not fix the plugin (as expected).
But there is logic in the plugin to dynamically run pip:
import pip
pip.main (bunch of args)
The import fails.
Does the Mac AIO app need some additional files to allow importing pip to work? Or is this not worthwhile given permissions of the installed app would require pip to install into itself?
Or is there a better way to implement in the plugin?
Which dependencies need to be installed?
There is a new dependencies portion to the Gramps Plugin Registration (.gpr.py) specification. They should be added there.
The specific dependency is gedcomx-v1 >= 1.0.13 . That package has a slew of dependencies like packaging and requests which have further dependencies. All told, I had to add 8 packages.
Is the Plugin Registration list auto-loaded (via pip) or is it just a warning when a dependency is not fulfilled? I suspect most Mac users cannot add these dependencies (lack of knowledge how to add into the gramps app) themselves.
Is there documentation for this change? I didnt see a GEPS for it. Is there an example that I can check to see if it works on the Mac?
Looking at the .gpr.py for any Addon showing a “Requires” button in the new Addon Manager will give you examples of how to register pre-requisites in the .gpr.py file.
However, it looks like the Requirements dialog could be improved by IDing the plugin. If you have multiple dialogs showing so you can find an example with the same requirements, It is easy to lose track of the parent plugin.
1 Like
The thread Internal server prerequistes and the new Addon Manager describes the new fields that can be added to the gpr file.
I suggest you post to the gramps-devel mailing list to ask about including pip in the Mac bundle. I don’t think that John Ralls reads this forum.
1 Like
Good idea. I’ll add some text similar to “Addon <addon_name> requires:”.
1 Like
@Nick-Hall We don’t have a 6.0 Repository with enough addons with Requirements to test whether this was implemented. Was Addon <addon_name> requires:
added to those dialogs?
Or does a Feature Request need to be submitted for 6.1 so it does not become lost?
13668: [Addon Manager] “Requirements” feedback dialog needs name of the Addon being reported about
On Windows 10, it was a bit problematic. In previous attempts, pip3 was not in the command path. So I installed PIP3 then used pip3 install gedcomx_v1
This reported success but the Requires button in the Addon Manager still reported it unavailable.
Nick informed that pip was actually bundled with the Gramps AIO. (A google said that pip
and pip3
are the same thing. But searching for it did not work because the directory was hidden and that directory was not in the command path.
On a fresh Windows install with Gramps 6.0, switched to %programfiles%
and drilled down to GrampsAIO64-6.0.0
and found pip
. Opened a console window to that path and tried:
pip install gedcomx_v1
Which failed with the error message:
ERROR: Could not install packages due to an OSerror: [WinError 5] access is denied: 'lib\\python3.12' Consider using the
–user option of check the permissions.
That option resulted in a successful install AND the installation satisfied the Requires portion of the Addon Manager:
pip install gedcomx_v1 --user