Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-18 Thread Volker Braun
It should be fixed in distlib which is vendored into pip...

On Monday, April 18, 2016 at 12:59:36 PM UTC+2, Erik Bray wrote:
>
> On Sat, Apr 16, 2016 at 2:13 PM, Jeroen Demeyer  > wrote: 
> > Great... that still doesn't work. 
>
> I agree that should be fixed.  It's like a two line patch that I'll 
> submit to pip. 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-18 Thread Dima Pasechnik


On Monday, April 18, 2016 at 11:59:36 AM UTC+1, Erik Bray wrote:
>
> On Sat, Apr 16, 2016 at 2:13 PM, Jeroen Demeyer  > wrote: 
> > Great... that still doesn't work. 
>
> I agree that should be fixed.  It's like a two line patch that I'll 
> submit to pip. 
>

except that it's probably not  that easy, according to
https://github.com/pypa/pip/issues/1165
and references therein.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-18 Thread Erik Bray
On Sat, Apr 16, 2016 at 2:13 PM, Jeroen Demeyer  wrote:
> Great... that still doesn't work.

I agree that should be fixed.  It's like a two line patch that I'll
submit to pip.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-16 Thread Dima Pasechnik
is this a clean experiment? I imagine one would try building pip over an 
ssl-less python...

On Saturday, April 16, 2016 at 1:10:17 PM UTC+1, Volker Braun wrote:
>
> $ mv local/lib/python/lib-dynload/_ssl.so 
> local/lib/python/lib-dynload/_ssl.so-backup
> $ sage -pip -h
> Traceback (most recent call last):
>   File "/home/vbraun/Code/sage.git/local/bin/pip", line 9, in 
> load_entry_point('pip==8.1.1', 'console_scripts', 'pip')()
>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 549, 
> in load_entry_point
>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 
> 2542, in load_entry_point
>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 
> 2202, in load
>   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 
> 2208, in resolve
>   File 
> "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/__init__.py",
>  
> line 16, in 
> from pip.vcs import git, mercurial, subversion, bazaar  # noqa
>   File 
> "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/vcs/subversion.py",
>  
> line 9, in 
> from pip.index import Link
>   File 
> "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
>  
> line 30, in 
> from pip.wheel import Wheel, wheel_ext
>   File 
> "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/wheel.py",
>  
> line 39, in 
> from pip._vendor.distlib.scripts import ScriptMaker
>   File 
> "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/distlib/scripts.py",
>  
> line 14, in 
> from .compat import sysconfig, detect_encoding, ZipFile
>   File 
> "/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/distlib/compat.py",
>  
> line 31, in 
> from urllib2 import (Request, urlopen, URLError, HTTPError,
> ImportError: cannot import name HTTPSHandler
>
>
> On Saturday, April 16, 2016 at 2:06:53 PM UTC+2, Jeroen Demeyer wrote:
>>
>> On 2016-04-16 12:15, Volker Braun wrote: 
>> > IMHO we should always use pip, but pip 
>> > depends on openssl. 
>>
>> Not for local packages, as far as I know. 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-16 Thread Jeroen Demeyer

Great... that still doesn't work.

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-16 Thread Volker Braun
$ mv local/lib/python/lib-dynload/_ssl.so 
local/lib/python/lib-dynload/_ssl.so-backup
$ sage -pip -h
Traceback (most recent call last):
  File "/home/vbraun/Code/sage.git/local/bin/pip", line 9, in 
load_entry_point('pip==8.1.1', 'console_scripts', 'pip')()
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 549, 
in load_entry_point
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2542, 
in load_entry_point
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2202, 
in load
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2208, 
in resolve
  File 
"/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/__init__.py",
 
line 16, in 
from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File 
"/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/vcs/subversion.py",
 
line 9, in 
from pip.index import Link
  File 
"/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
 
line 30, in 
from pip.wheel import Wheel, wheel_ext
  File 
"/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/wheel.py",
 
line 39, in 
from pip._vendor.distlib.scripts import ScriptMaker
  File 
"/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/distlib/scripts.py",
 
line 14, in 
from .compat import sysconfig, detect_encoding, ZipFile
  File 
"/home/vbraun/Code/sage.git/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/distlib/compat.py",
 
line 31, in 
from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler


On Saturday, April 16, 2016 at 2:06:53 PM UTC+2, Jeroen Demeyer wrote:
>
> On 2016-04-16 12:15, Volker Braun wrote: 
> > IMHO we should always use pip, but pip 
> > depends on openssl. 
>
> Not for local packages, as far as I know. 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-16 Thread Jeroen Demeyer

On 2016-04-16 12:15, Volker Braun wrote:

IMHO we should always use pip, but pip
depends on openssl.


Not for local packages, as far as I know.

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-16 Thread Simon King
Hi Thierry,

On 2016-04-16, Thierry  wrote:
> - for standard packages, the source must be provided since the tarball is
>   supposed to be autonomous.

If I understand correctly, that'S exactly what the proposal would
change: Sage sources would contain the information that package "foo"
has to be pip-installed by default, but it does *not* provide foo's
source tar-ball, since that's not needed in order to pip-install it.

I suppose there could be a file in the Sage sources providing a list
of everything that should be pip-installed by default, and then as soon
as Sage has built its own version of Python, it would go through that
list and install stuff.

And that's a kind of modularisation that I'd like.

Best regards,
Simon


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Proposal: install all pip-installable components of Sage via pip, directly

2016-04-16 Thread Volker Braun
I think there are two different tasks:

1) Use pip to install python packages, regardless of where the package is. 
Maybe we bundle the tarball, maybe its on PyPI, maybe its on github. Pip 
can install either just fine. IMHO we should always use pip, but pip 
depends on openssl. We'll save us much hassle if we can just wait until 
openssl gets around to fixing their license as announced.

2) Download package tarballs from PyPI instead of our own mirror. IMHO 
thats just a tooling problem, either should be trivial. I have a script 
that searches for PyPI updates, downloads the latest version, and updates 
package_version.txt and checksums.ini accordingly. Thats about as much work 
as updating the version in a requirements.txt file. 


On Saturday, April 16, 2016 at 10:59:22 AM UTC+2, Dima Pasechnik wrote:
>
> Presently we distribute a number of tarballs that are copies of 
> pip-installable Python packages, which are dependencies of something, and 
> maintain placeholders for them in build/pkg/ (this will be completely true 
> as soon as #14840 is merged).
> This is a lot of unnecessary stuff to carry around, and is quite different 
> to what is done in pythonic (as well as ocaml, haskell, Macaulay2, etc) 
> universe.
>
> My proposal is to get rid of these, and install pip-installable 
> dependencies directly. Perhaps maintaining a catalog of such dependencies 
> in some way; perhaps such facilities are provided by pip already, one needs 
> to check this out.
> We may keep (some) placeholders in build/pkg, for the purpose of 
> bootstrapping.
> One added advantage is  that we can provide a sane way to install packages 
> which cannot be installed from distributed sources, such as ssl support.
>
> In case one wants all the sources needed for a complete Sage install 
> packaged locally,
> this is easy to achieve by providing a custom pip repo; such a repo may 
> become some kind of optional component.
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.