Re: About requests.packages.urllib3 in Debian

2014-11-05 Thread Julien Cristau
On Wed, Nov  5, 2014 at 07:52:55 +0100, Matthias Urlichs wrote:

> Hi,
> 
> Daniele Tricoli:
> > Due to #753578 I added a stub (technically I just used a symlink) to make
> > import requests.packages.urllib3 works.
> 
> I'd add a stub _file_ which just contains "from urllib3 import *".
> 
Would that work for submodules?  (I'm guessing "no".)

Cheers,
Julien
-- 
Julien Cristau  
Logilab http://www.logilab.fr/
Informatique scientifique & gestion de connaissances


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141105090145.gc19...@crater2.logilab.fr



Re: About requests.packages.urllib3 in Debian

2014-11-05 Thread Jakub Wilk

* Daniele Tricoli , 2014-11-04, 23:35:
since requests 1.1.0-1 convenience copy of already packaged libraries 
are not shipped to follow Policy 4.13.
(The package is tested at every rev but manually because tests need 
Internet connection.)


Due to #753578 I added a stub (technically I just used a symlink) to 
make import requests.packages.urllib3 works.
It's used as import location by several projects since it is documented 
as import location:


   
http://www.python-requests.org/en/latest/user/advanced/#example-specific-ssl-version

This lead to #767445 because Python import system doesn't know that 
urllib3 == requests.packages.urllib3 as described in detail here:


Maybe it'd be overkill, but it's possible to teach Python that urllib3 
and requests.packages.urllib3 are the same thing. Adding something like 
this to the top of requests/__init__.py should do the trick:


import pkgutil
import sys
import urllib3

def _attach_namespace(package, where):
   for loader, name, ispkg in pkgutil.walk_packages(package.__path__, 
package.__name__ + '.'):
   try:
   module = __import__(name)
   except ImportError:
   continue # oh well
   sys.modules[where + '.' + name] = module

_attach_namespace(urllib3, 'requests.packages')
del _attach_namespace

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141105111529.ga7...@jwilk.net



Re: Trying to build python3 version of scikit-learn, python3-* pkgs come out empty

2014-11-05 Thread Yaroslav Halchenko
I would recommend to look into rules of pandas package where I with
Julian's initiative have somewhat "harmonized" (although it is
still quite ugly) building both python2 and python3 with moving .so to
-lib packages .

I know that MDP's author is also eager to get python3-sklearn package so
it would be great if you join the effort...  changes -- better send as a
PR against   git://github.com/yarikoptic/scikit-learn.git  -- would be
easier to review/merge

cheers!

On Tue, 04 Nov 2014, Zack Weinberg wrote:

> The scikit-learn packaging only builds python2 packages, even though
> upstream does support python3 (this is bug #730532).  I happen to need
> scikit with python3 so I tried to update the packaging using the
> instructions at https://wiki.debian.org/Python/Pybuild , but I
> consistently get a python3-sklearn package containing only
> /usr/share/doc.  Can anyone suggest what I might have done wrong?  In
> the build log, it appears that pybuild did build both v2 and v3
> versions of the software, but then only v2 got copied into appropriate
> subdirectories of debian/ to be picked up by dpkg-deb.

> I'm attaching my modified debian/control and debian/rules.  I already
> know that commenting out the override_dh_python2 block broke something
> *else* -- that's not the immediate problem.

> zw

> [-- octet-filter file type: "ASCII text" --]

> Source: scikit-learn
> Section: python
> Priority: optional
> Maintainer: NeuroDebian Team 
> Uploaders: Yaroslav Halchenko , Michael Hanke 
> 
> Build-Depends: debhelper (>= 8), dh-autoreconf, dh-python,
>python-all-dev (>= 2.6.6-3~),
>python3-all-dev (>= 3.4),
>cython (>= 0.12~),
>python-setuptools,
>python3-setuptools,
>python-numpy, python-scipy,
>python3-numpy, python3-scipy,
>libsvm-dev (>= 2.84.0),
>python-nose, python-matplotlib, python-joblib (>= 0.4.5),
>python3-nose, python3-matplotlib, python3-joblib (>= 0.4.5),
>gfortran, libatlas3-base, libatlas-dev, libblas-dev, 
> liblapack-dev
> Build-Depends-Indep:
>python-sphinx (>= 1.0), python-imaging, graphviz,
> Standards-Version: 3.9.4
> X-Python-Version: >= 2.6
> X-Python3-Version: >= 3.4
> Homepage: http://scikit-learn.sourceforge.net
> Vcs-Browser: http://github.com/yarikoptic/scikit-learn
> Vcs-Git: git://github.com/yarikoptic/scikit-learn.git

> Package: python-sklearn
> Replaces: python-scikits-learn (<< 0.9~)
> Breaks: python-scikits-learn (<< 0.9~)
> Architecture: all
> Depends: ${misc:Depends}, ${python:Depends}, python-numpy, python-scipy, 
> python-sklearn-lib(>= ${source:Version}),
>  python-joblib (>= 0.4.5),
> Provides: ${python:Provides}
> Recommends: python-nose, python-matplotlib
> Suggests: python-dap, python-scikits-optimization, python-sklearn-doc, ipython
> Enhances: python-mvpa2, python-mdp
> Description: Python modules for machine learning and data mining
>  scikit-learn is a collection of Python modules relevant to
>  machine/statistical learning and data mining.  Non-exhaustive list of
>  included functionality:
>   - Gaussian Mixture Models
>   - Manifold learning
>   - kNN
>   - SVM (via LIBSVM)
>  .
>  This is the Python 2 version.

> Package: python3-sklearn
> Architecture: all
> Depends: ${misc:Depends}, ${python3:Depends}, python3-numpy, python3-scipy, 
> python3-sklearn-lib(>= ${source:Version}),
>  python3-joblib (>= 0.4.5),
> Provides: ${python3:Provides}
> Recommends: python3-nose, python3-matplotlib
> Suggests: python3-dap, python3-scikits-optimization, python3-sklearn-doc, 
> ipython
> Enhances: python3-mvpa2, python3-mdp
> Description: Python modules for machine learning and data mining
>  scikit-learn is a collection of Python modules relevant to
>  machine/statistical learning and data mining.  Non-exhaustive list of
>  included functionality:
>   - Gaussian Mixture Models
>   - Manifold learning
>   - kNN
>   - SVM (via LIBSVM)
>  .
>  This is the Python 3 version.

> Package: python-sklearn-doc
> Conflicts: python-scikits-learn-doc
> Replaces: python-scikits-learn-doc
> Architecture: all
> Section: doc
> Depends: ${misc:Depends}, libjs-jquery
> Suggests: python-sklearn, python3-sklearn
> Description: documentation and examples for scikit-learn
>  This package contains documentation and example scripts for
>  python-sklearn.

> Package: python-sklearn-lib
> Conflicts: python-scikits-learn-lib
> Replaces: python-scikits-learn-lib
> Architecture: any
> Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, python-numpy
> Provides: ${python:Provides}
> Description: low-level implementations and bindings for scikit-learn
>  This is an add-on package for python-sklearn. It provides
>  low-level implementations and custom Python bindings for the LIBSVM
>  library.
>  .
>  This is the Python 2 version.

> Package: python3-sklearn-lib
> Architecture: any
> Depends:

Re: Trying to build python3 version of scikit-learn, python3-* pkgs come out empty

2014-11-05 Thread Piotr Ożarowski
[Zack Weinberg, 2014-11-05]
> The scikit-learn packaging only builds python2 packages, even though
> upstream does support python3 (this is bug #730532).  I happen to need
> scikit with python3 so I tried to update the packaging using the
> instructions at https://wiki.debian.org/Python/Pybuild , but I
> consistently get a python3-sklearn package containing only
> /usr/share/doc.  Can anyone suggest what I might have done wrong?  In

you're not using pybuild, at least not in install stage (removing
override_dh_auto_install and next 3 lines should help)
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141105214519.gg2...@sts0.p1otr.com



Re: Trying to build python3 version of scikit-learn, python3-* pkgs come out empty

2014-11-05 Thread Piotr Ożarowski
[Yaroslav Halchenko, 2014-11-05]
> I would recommend to look into rules of pandas package where I with
> Julian's initiative have somewhat "harmonized" (although it is
> still quite ugly) building both python2 and python3 with moving .so to
> -lib packages .

pybuild can do that for you (--ext-dest-dir or
PYBUILD_EXT_DEST_DIR_python2 and PYBUILD_EXT_DEST_DIR_python3)
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141105214827.gh2...@sts0.p1otr.com



Re: Trying to build python3 version of scikit-learn, python3-* pkgs come out empty

2014-11-05 Thread Yaroslav Halchenko
That is great... eventually I would switch. I am still providing backports for 
supported debian ubuntu releases through NeuroDebian, so I would need 
compatible version of pybuild for those releases.  Pandas though might switch 
earlier since they started to demand recentish numpy, so backports aren't 
possible anyways.

On November 5, 2014 4:48:27 PM EST, "Piotr Ożarowski"  wrote:
>[Yaroslav Halchenko, 2014-11-05]
>> I would recommend to look into rules of pandas package where I with
>> Julian's initiative have somewhat "harmonized" (although it is
>> still quite ugly) building both python2 and python3 with moving .so
>to
>> -lib packages .
>
>pybuild can do that for you (--ext-dest-dir or
>PYBUILD_EXT_DEST_DIR_python2 and PYBUILD_EXT_DEST_DIR_python3)

-- 
Sent from a phone which beats iPhone.


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/35f7bc5f-be8f-499e-a839-0bcca5240...@email.android.com