dependency on packages typed 'pip'

43 views
Skip to first unread message

Thierry

unread,
Aug 26, 2016, 8:22:37 AM8/26/16
to sage-...@googlegroups.com
Hi,

while packaging a package p1, i have set a dependency to another package
p2 whose type is 'pip'. However, when i try to install the package p1, the
dependency p2 is not installed (and apparently it is not even considered).
If i do 'sage -i p2', it is correctly installed. Is it a feature ?

Ciao,
Thierry

Jeroen Demeyer

unread,
Aug 26, 2016, 8:28:07 AM8/26/16
to sage-...@googlegroups.com
pip packages are not real packages. If you really want to depend on a
"pip" package, the best way would be to convert it to a real package.

Also:

* standard packages should only depend on standard packages.

* optional packages should only depend on standard or optional packages.

* experimental packages should only depend on standard, optional or
experimental packages.

Thierry

unread,
Aug 26, 2016, 8:40:57 AM8/26/16
to sage-...@googlegroups.com
So, what is the usecase for package typed 'pip' ? If they can only be
installed manually (i.e. not as dependency), they could be installed with
'sage -pip install' anyway without having to create such fake package
first.

Ciao,
Thierry
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

Jeroen Demeyer

unread,
Aug 26, 2016, 8:43:09 AM8/26/16
to sage-...@googlegroups.com
On 2016-08-26 14:40, Thierry wrote:
> So, what is the usecase for package typed 'pip' ?

It's only a convenient user interface: the user does not need to know
whether a package is available using pip or as Sage package: "./sage -i
PKGNAME" will work.

Thierry

unread,
Aug 26, 2016, 8:49:26 AM8/26/16
to sage-...@googlegroups.com
Shall we flood the pkg directory just in case someone needs to install
trac or mercurial ? The list of potentially interesting packages is pretty
huge: https://www.scipy.org/topical-software.html

Wouldn't it be better to advise the user that s·he can use 'sage -pip
install' when a package does not exist ?

Ciao,
Thierry

leif

unread,
Aug 26, 2016, 10:16:12 AM8/26/16
to sage-...@googlegroups.com
Thierry wrote:
> On Fri, Aug 26, 2016 at 02:43:05PM +0200, Jeroen Demeyer wrote:
>> On 2016-08-26 14:40, Thierry wrote:
>>> So, what is the usecase for package typed 'pip' ?
>>
>> It's only a convenient user interface: the user does not need to know
>> whether a package is available using pip or as Sage package: "./sage -i
>> PKGNAME" will work.
>
> Shall we flood the pkg directory just in case someone needs to install
> trac or mercurial ? The list of potentially interesting packages is pretty
> huge: https://www.scipy.org/topical-software.html
>
> Wouldn't it be better to advise the user that s·he can use 'sage -pip
> install' when a package does not exist ?

When a package does not exist, we shouldn't advise the user to (try to)
install it. ;-)


I agree though that type=='pip' is a bit useless at the moment, and
doesn't fit the other "types". (See also comments from Erik and me on
the neighbour thread on R regarding what package types we'd need...)


-leif


Erik Bray

unread,
Aug 29, 2016, 6:06:19 AM8/29/16
to sage-devel
I would just as soon do away with "type=='pip'" and instead have a
standard `pip install` wrapper script that a package's spkg-install
symlinks too. Maybe still something in there somewhere to note that
it's not a standard sage package and is instead installed from PyPI,
but I don't know that the package type is the appropriate metadata for
that, though I can see why it was used originally. (Maybe such a
package could be called "external"--i.e. not really part of sage at
all, and having dependencies not necessarily from sage either--in
principle such an external package could come from many possible
sources too, not just pip/PyPI--but that's getting ahead of myself).
Reply all
Reply to author
Forward
0 new messages