Extensions

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Extensions

Bryce Harrington-3
On Fri, Mar 23, 2018 at 12:28:14AM +0100, Maren Hachmann wrote:

> Am 23.03.2018 um 00:08 schrieb Bryce Harrington:
> - I've often seen them using git submodules. For example, MyCroft AI
> (smart assistant), pelican (python static website generator) and Atom
> (editor) use this approach for their (partially user-contributed)
> extensions (but they do have the extensions in a separate repo, and pull
> **those** in via submodules).
>
> I seem to remember though that this thought had been rejected due to the
> complexity it brings. Currently, I wouldn't know how to work with it
> either, but probably it wouldn't be too hard to find out.

They can make a lot of sense for projects where the primary distribution
mechanism is git itself.  However, the vast majority of our users
are using packages (heck they've probably never even heard of git).

(Part of my earlier concern with git submodules was that in transitioning
from bzr to git, we were imposing a bit of a learning curve on our
developers, and adding git submodules would increase the complexity of
the transition.  I suspect now, though, everyone is conversant enough in
git, that this particular concern is no longer really a factor.  Of
course, even so it might end up being more complication than benefit,
but I don't think we necessarily need to rule it out just out of
principle if we have a good situation where it would make sense.)

Bryce


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

Re: Extensions

doctormo
In reply to this post by Maren Hachmann
On Fri, 2018-03-23 at 01:22 +0100, Maren Hachmann wrote:
> - Btw. as far as I understand, our Windows versions come with pip as
> part of the python installation, to facilitate installing extension
> dependencies (Eduard will know more about this). Doesn't look like a
> virtualenv to me, though.

Pip may be all that's required, you don't need virtualenv to have a
custom prefix:

https://stackoverflow.com/questions/2915471/install-a-python-package-in
to-a-different-directory-using-pip

I believe this eliminates one of the problems, no extra deps (on
windows at least) and removing binaries from the conf.

Martin,

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

Re: Extensions

Marc Jeanmougin
In reply to this post by Bryce Harrington-3
If we come to separate extensions, git submodules sounds like a
reasonable way to go. We could also extend the approach to other things
like 2geom and adaptagram libraries, where we want to stay up to date as
long as they are not packaged independently.

Also re virtualenv for python, iirc there may be a way to just provide a
pyvenv.cfg file ?

--
Mc


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

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Extensions

Eduard Braun
In reply to this post by doctormo
Am 23.03.2018 um 03:44 schrieb Martin Owens:
On Fri, 2018-03-23 at 01:22 +0100, Maren Hachmann wrote:
- Btw. as far as I understand, our Windows versions come with pip as
part of the python installation, to facilitate installing extension
dependencies (Eduard will know more about this). Doesn't look like a
virtualenv to me, though.
Pip may be all that's required, you don't need virtualenv to have a
custom prefix:

https://stackoverflow.com/questions/2915471/install-a-python-package-in
to-a-different-directory-using-pip

I believe this eliminates one of the problems, no extra deps (on
windows at least) and removing binaries from the conf.

Martin,

I'll stop you right there (I'd prefer if we stopped "eliminating" problems that swiftly without actual investigation):
  • pip is currently *not* included in Windows builds (it was for a short time when I last updated the devlibs - which we do not use anymore - but it was completely experimental back then and usage was not straightforward with some things not working as one would expect). Investigating the usage of pip is on my todo list but I did not find the time so far.
  • Even *if* we get pip do work properly you need to be aware that it's generally not possible to install any modules with it that contain binary components. pip is not magically allowing us to compile stuff on-the-fly. It can only work for pure Python modules (and even that fails occasionally, especially if any non-standard setups are attempted - like the one you seem to suggest).
Regards,
Eduard

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

Re: Extensions

doctormo
On Fri, 2018-03-23 at 10:41 +0100, Eduard Braun wrote:
> pip is currently *not* included in Windows builds (it was for a short
> time when I last updated the devlibs - which we do not use anymore -
> but it was completely experimental back then and usage was not
> straightforward with some things not working as one would expect).
> Investigating the usage of pip is on my todo list but I did not find
> the time so far.

Very good to know. I'm very ignorant of the windows builds.

> Even *if* we get pip do work properly you need to be aware that it's
> generally not possible to install any modules with it that contain
> binary components. pip is not magically allowing us to compile stuff
> on-the-fly. It can only work for pure Python modules (and even that
> fails occasionally, especially if any non-standard setups are
> attempted - like the one you seem to suggest).

We may not need binary builds, there are only a handful of cases where
they'd be useful. Our own libs if they got python support would be
shipped with Inkscape, while things like numpy if they were ever
needed, could use either wheels or external installation.

Supporting that internally would be a perfect solution, but it
shouldn't be the enemy of the good for the majority. ~90% of extensions
are likely to not need any external dependencies, and ~90% of them will
use pure python libraries. We can forgo ~1% of support being automatic.

Best Regards, Martin Owens

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

Re: Extensions

Maren Hachmann
In reply to this post by Eduard Braun
Am 23.03.2018 um 10:41 schrieb Eduard Braun:

> Am 23.03.2018 um 03:44 schrieb Martin Owens:
>> On Fri, 2018-03-23 at 01:22 +0100, Maren Hachmann wrote:
>>> - Btw. as far as I understand, our Windows versions come with pip as
>>> part of the python installation, to facilitate installing extension
>>> dependencies (Eduard will know more about this). Doesn't look like a
>>> virtualenv to me, though.
>> Pip may be all that's required, you don't need virtualenv to have a
>> custom prefix:
>>
>> https://stackoverflow.com/questions/2915471/install-a-python-package-in
>> to-a-different-directory-using-pip
>>
>> I believe this eliminates one of the problems, no extra deps (on
>> windows at least) and removing binaries from the conf.
>>
>> Martin,
>
> I'll stop you right there (I'd prefer if we stopped "eliminating"
> problems that swiftly without actual investigation):
>
>   * pip is currently *not* included in Windows builds (it was for a
>     short time when I last updated the devlibs - which we do not use
>     anymore - but it was completely experimental back then and usage was
>     not straightforward with some things not working as one would
>     expect). Investigating the usage of pip is on my todo list but I did
>     not find the time so far.


- Eduard, I had looked and had found the following in Inkscape 0.92.2,
isn't that pip? Else I wouldn't have written anything about it here. I
also understood that some people had been using it for installing
dependencies - but it might be they had to install it separately.

https://i.imgur.com/R9YSqiE.png

Or maybe it just doesn't work, but is included? Or it's something
else...? Sorry, I don't know enough.

Maren


>   * Even *if* we get pip do work properly you need to be aware that it's
>     generally not possible to install any modules with it that contain
>     binary components. pip is not magically allowing us to compile stuff
>     on-the-fly. It can only work for pure Python modules (and even that
>     fails occasionally, especially if any non-standard setups are
>     attempted - like the one you seem to suggest).
>
> Regards,
> Eduard


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