Quantcast

Add-on Dependencies

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Add-on Dependencies

John Ralls-2
Devs,

A new add-on [1] requires a PIP package and in the PR asked how to get that package included in the AIO bundles.

I think it would be better to add a mechanism so that add-ins could declare PIP dependencies in gpr.py files and have those packages added to the plugins folder rather than requiring the AIO packages and Linux distro package maintainers to include a bunch of dependencies that ought to be optional. That should be a pretty straightforward change for pure-python modules like the networkx package that PR62 needs. Packages that have C components are more difficult, particularly in light of anti-malware measures like Apple's System Integrity Protection that won't allow binary linking outside of the bundle except to the system libraries.

Thoughts?

Regards,
John Ralls



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Paul Franklin-5
On 3/19/17, John Ralls <[hidden email]> wrote:

> Devs,
>
> A new add-on [1] requires a PIP package and in the PR asked how to get that
> package included in the AIO bundles.
>
> I think it would be better to add a mechanism so that add-ins could declare
> PIP dependencies in gpr.py files and have those packages added to the
> plugins folder rather than requiring the AIO packages and Linux distro
> package maintainers to include a bunch of dependencies that ought to be
> optional. That should be a pretty straightforward change for pure-python
> modules like the networkx package that PR62 needs. Packages that have C
> components are more difficult, particularly in light of anti-malware
> measures like Apple's System Integrity Protection that won't allow binary
> linking outside of the bundle except to the system libraries.
>
> Thoughts?
>
> Regards,
> John Ralls
>
>
> [1] https://github.com/gramps-project/addons-source/pull/62
> <https://github.com/gramps-project/addons-source/pull/62>

I like that idea.

I've never run the GraphView addon and so I don't
want to end up with a bloated gramps installation for
something I'm never likely to use.

It's the same story for this new addon (in p.r. 62).  I
have never run it and don't think I'm likely to.

I don't want to go to the hassle of downloading some
library packages which my (old) distro might not even have.

I especially don't like the idea of setting a precedent
whereby any third-party addon developer can say what
should be required in order to run gramps.

If some addon was ever put into the "core" gramps, then
that would be a different story, but I don't think anybody is
suggesting that, whether for p.r. 62 or GraphView.

How the Mac and Windows packagers will handle this
addon dependency problem is another matter.  I don't
have a good answer for that.  Perhaps an optional
"gramps optional dependencies" package would need
to be made.  Perhaps some linux-only flag needs to be
in the gpr file.  But I leave that decision to the packagers.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Josip
In reply to this post by John Ralls-2
19.3.2017. u 18:48, John Ralls je napisao/la:

> Devs,
>
> A new add-on [1] requires a PIP package and in the PR asked how to get that package included in the AIO bundles.
>
> I think it would be better to add a mechanism so that add-ins could declare PIP dependencies in gpr.py files and have those packages added to the plugins folder rather than requiring the AIO packages and Linux distro package maintainers to include a bunch of dependencies that ought to be optional. That should be a pretty straightforward change for pure-python modules like the networkx package that PR62 needs. Packages that have C components are more difficult, particularly in light of anti-malware measures like Apple's System Integrity Protection that won't allow binary linking outside of the bundle except to the system libraries.
>
> Thoughts?
>
> Regards,
> John Ralls
>

I don't think that any add-in or Gramps core should call pip on their
own so it doesn't matter where such module be installed.


--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Josip
19.3.2017. u 21:41, Hans Ulrich Frink je napisao/la:

> Hi Devs
> I tried to install NetworkChart addon as it was displayed in addon install
> dialogue but the install showed ERROR without specifying which one. As I
> use gramps 4.2.5 on Windows it lacks graphviz. there is no way to install
> development version of pygraphviz on windows.I could install networkx
> separately.
> Any ideas how to run the application?
> cheers
> Uli
>
> 2017-03-19 21:13 GMT+01:00 Josip <[hidden email]>:
>
>> 19.3.2017. u 18:48, John Ralls je napisao/la:
>>> Devs,
>>>
>>> A new add-on [1] requires a PIP package and in the PR asked how to get
>> that package included in the AIO bundles.
>>>
>>> I think it would be better to add a mechanism so that add-ins could
>> declare PIP dependencies in gpr.py files and have those packages added to
>> the plugins folder rather than requiring the AIO packages and Linux distro
>> package maintainers to include a bunch of dependencies that ought to be
>> optional. That should be a pretty straightforward change for pure-python
>> modules like the networkx package that PR62 needs. Packages that have C
>> components are more difficult, particularly in light of anti-malware
>> measures like Apple's System Integrity Protection that won't allow binary
>> linking outside of the bundle except to the system libraries.
>>>
>>> Thoughts?
>>>
>>> Regards,
>>> John Ralls
>>>
>>
>> I don't think that any add-in or Gramps core should call pip on their
>> own so it doesn't matter where such module be installed.
>>
>>
>> --
>> Josip
>>
>

You need both networkx and pygraphviz for NetworkChart addon to work.


--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Hans Ulrich Frink-2
Thats true. But where do I get a suitable file?
Even 
has not
Cheers
Uli

2017-03-19 21:52 GMT+01:00 Josip <[hidden email]>:
19.3.2017. u 21:41, Hans Ulrich Frink je napisao/la:
> Hi Devs
> I tried to install NetworkChart addon as it was displayed in addon install
> dialogue but the install showed ERROR without specifying which one. As I
> use gramps 4.2.5 on Windows it lacks graphviz. there is no way to install
> development version of pygraphviz on windows.I could install networkx
> separately.
> Any ideas how to run the application?
> cheers
> Uli
>
> 2017-03-19 21:13 GMT+01:00 Josip <[hidden email]>:
>
>> 19.3.2017. u 18:48, John Ralls je napisao/la:
>>> Devs,
>>>
>>> A new add-on [1] requires a PIP package and in the PR asked how to get
>> that package included in the AIO bundles.
>>>
>>> I think it would be better to add a mechanism so that add-ins could
>> declare PIP dependencies in gpr.py files and have those packages added to
>> the plugins folder rather than requiring the AIO packages and Linux distro
>> package maintainers to include a bunch of dependencies that ought to be
>> optional. That should be a pretty straightforward change for pure-python
>> modules like the networkx package that PR62 needs. Packages that have C
>> components are more difficult, particularly in light of anti-malware
>> measures like Apple's System Integrity Protection that won't allow binary
>> linking outside of the bundle except to the system libraries.
>>>
>>> Thoughts?
>>>
>>> Regards,
>>> John Ralls
>>>
>>
>> I don't think that any add-in or Gramps core should call pip on their
>> own so it doesn't matter where such module be installed.
>>
>>
>> --
>> Josip
>>
>

You need both networkx and pygraphviz for NetworkChart addon to work.


--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

John Ralls-2
In reply to this post by Josip

> On Mar 19, 2017, at 1:13 PM, Josip <[hidden email]> wrote:
>
> 19.3.2017. u 18:48, John Ralls je napisao/la:
>> Devs,
>>
>> A new add-on [1] requires a PIP package and in the PR asked how to get that package included in the AIO bundles.
>>
>> I think it would be better to add a mechanism so that add-ins could declare PIP dependencies in gpr.py files and have those packages added to the plugins folder rather than requiring the AIO packages and Linux distro package maintainers to include a bunch of dependencies that ought to be optional. That should be a pretty straightforward change for pure-python modules like the networkx package that PR62 needs. Packages that have C components are more difficult, particularly in light of anti-malware measures like Apple's System Integrity Protection that won't allow binary linking outside of the bundle except to the system libraries.
>>
>> Thoughts?
>>
>> Regards,
>> John Ralls
>>
>
> I don't think that any add-in or Gramps core should call pip on their
> own so it doesn't matter where such module be installed.

In that case either the AIO includes the dependency or the add-on doesn't work unless the user is sophisticated enough to know how to call PIP on their own and to put the resulting module in the right place.

If that's to be our policy then we need a more graceful way of handling unsatisfied dependencies. Perhaps we can extend the list that we download to populate the Preferences update dialog to mark add-ons with unsatisfied dependencies so that the user can't download them?

Regards,
John Ralls


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Paul Franklin-5
>> I don't think that any add-in or Gramps core should call pip on their
>> own so it doesn't matter where such module be installed.
>
> In that case either the AIO includes the dependency or the add-on doesn't
> work unless the user is sophisticated enough to know how to call PIP on
> their own and to put the resulting module in the right place.
>
> If that's to be our policy then we need a more graceful way of handling
> unsatisfied dependencies. Perhaps we can extend the list that we download to
> populate the Preferences update dialog to mark add-ons with unsatisfied
> dependencies so that the user can't download them?

I would like to see it required that every author of every
third-party addon which requires a dependency which
is not included with core gramps be required to have
their addon start >always<, using only the standard gramps
API.

A dialog should then appear telling the user that
so-and-so is required and it does not seem to be already
present on the user's machine.  The dialog should then
go on to tell the user what to do to get whatever it is (or
are), and we should require the instructions to cover all
three major types of o.s. which gramps runs on (linux,
Mac, and Windows).

I don't see any reason why we should be required to do
it when it is for a third-party addon, which >by definition<
is supposed to be author-supported.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Josip
In reply to this post by Hans Ulrich Frink-2
19.3.2017. u 22:09, Hans Ulrich Frink je napisao/la:
> Thats true. But where do I get a suitable file?
> Even
> http://www.lfd.uci.edu/~gohlke/pythonlibs/
> has not
> Cheers
> Uli

Even if it has it will nor work wit AIO bundle

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Hans Ulrich Frink-2
Thanks for the hints.
After installing Graphviz 238 and setting path:
with pip install pygraphviz gives ERROR "unable to find vcvarsall.bat"

I think graphviz-2.38.msi  is 32bit and binding is 64bit

cheers
Uli


2017-03-19 22:53 GMT+01:00 Josip <[hidden email]>:
19.3.2017. u 22:09, Hans Ulrich Frink je napisao/la:
> Thats true. But where do I get a suitable file?
> Even
> http://www.lfd.uci.edu/~gohlke/pythonlibs/
> has not
> Cheers
> Uli

Even if it has it will nor work wit AIO bundle

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

John Ralls-2

> On Mar 19, 2017, at 3:14 PM, Hans Ulrich Frink <[hidden email]> wrote:
>
> Thanks for the hints.
> After installing Graphviz 238 and setting path:
> with pip install pygraphviz gives ERROR "unable to find vcvarsall.bat"
>
> I think graphviz-2.38.msi  is 32bit and binding is 64bit
>

That wouldn't have anything to do with a bat file. Does that file exist in the newly-installed GraphViz directories? Did you make sure that the path to the Graphviz files is on your path when installing pygraphviz?

Regards,
John Ralls



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Josip
In reply to this post by Hans Ulrich Frink-2
19.3.2017. u 23:14, Hans Ulrich Frink je napisao/la:

> Thanks for the hints.
> After installing Graphviz 238 and setting path:
> with pip install pygraphviz gives ERROR "unable to find vcvarsall.bat"
>
> I think graphviz-2.38.msi
> <http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi>  is
> 32bit and binding is 64bit
>
> cheers
> Uli


AIO already contain graphviz which is as python himself compiled with
gcc so pygraphviz should be also.

I can try to build it this days!

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Josip
In reply to this post by John Ralls-2
19.3.2017. u 23:20, John Ralls je napisao/la:

>
>> On Mar 19, 2017, at 3:14 PM, Hans Ulrich Frink <[hidden email]> wrote:
>>
>> Thanks for the hints.
>> After installing Graphviz 238 and setting path:
>> with pip install pygraphviz gives ERROR "unable to find vcvarsall.bat"
>>
>> I think graphviz-2.38.msi  is 32bit and binding is 64bit
>>
>
> That wouldn't have anything to do with a bat file. Does that file exist in the newly-installed GraphViz directories? Did you make sure that the path to the Graphviz files is on your path when installing pygraphviz?
>
> Regards,
> John Ralls
>
>

Pip try to build it with Microsoft Visual Studio so he search for
vcvarsall.bat so see how to configure it.

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Hans Ulrich Frink-2
In reply to this post by Josip
Thanks in advance. that would be very helpful!
having networkx run together with gramps gives possibilities to a lot of nice reports.
cheers 
Uli

2017-03-19 23:23 GMT+01:00 Josip <[hidden email]>:
19.3.2017. u 23:14, Hans Ulrich Frink je napisao/la:
Thanks for the hints.
After installing Graphviz 238 and setting path:
with pip install pygraphviz gives ERROR "unable to find vcvarsall.bat"

I think graphviz-2.38.msi
<http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi>  is
32bit and binding is 64bit

cheers
Uli


AIO already contain graphviz which is as python himself compiled with gcc so pygraphviz should be also.

I can try to build it this days!

--
Josip


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add-on Dependencies

Josip
19.3.2017. u 23:30, Hans Ulrich Frink je napisao/la:

> Thanks in advance. that would be very helpful!
> having networkx run together with gramps gives possibilities to a lot of
> nice reports.
> cheers
> Uli
>
> 2017-03-19 23:23 GMT+01:00 Josip <[hidden email]>:
>
>> 19.3.2017. u 23:14, Hans Ulrich Frink je napisao/la:
>>
>>> Thanks for the hints.
>>> After installing Graphviz 238 and setting path:
>>> with pip install pygraphviz gives ERROR "unable to find vcvarsall.bat"
>>>
>>> I think graphviz-2.38.msi
>>> <http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi>
>>> is
>>> 32bit and binding is 64bit
>>>
>>> cheers
>>> Uli
>>>
>>
>>
>> AIO already contain graphviz which is as python himself compiled with gcc
>> so pygraphviz should be also.
>>
>> I can try to build it this days!
>>
>> --
>> Josip
>>
>

If you want to make hole Gramps environment by yourself i updated page
https://gramps-project.org/wiki/index.php?title=Gramps_for_Windows_with_MSYS2
which included instruction also for pygraphviz.

--
Josip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Loading...