Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Jorge Sebastião Soares
Forgot to CC debian python:


-- Forwarded message --
From: Jorge Sebastião Soares 
Date: Mon, Nov 24, 2014 at 11:31 AM
Subject: Re: [iva] - Python 3 code depends on pysam
To: Debian Med Project List 


Hi Bary, all



On Fri, Nov 21, 2014 at 7:29 PM, Barry Warsaw  wrote:

> On Nov 21, 2014, at 05:30 PM, Jorge Sebastião Soares wrote:
>
> >Does anyone know if python3-pysam will be available soon?
> >Or if there are any plans to have it as a Debian package at all?
>
> I took a *very* quick look, but unfortunately don't have time to dig in
> deeper.  It seems that pysam is Python 3 compatible upstream, and the
> Debian
> packaging already uses pybuild.   It might be as easy as adding --with
> python3
> and then adding the appropriate additional binary packaging goodness.
>
>
So, my rules file already has the '--with python3' statement. You can see
this in [1]
I think the problem is that when calling pysam, it looks inside
'/usr/lib/python3/' and pysam is not deployed there.

I'll have a look to see what I can find online.
Any other suggestions are very welcome.

Regards,

Jorge


[1] - http://anonscm.debian.org/cgit/debian-med/iva.git/tree/debian/rules


Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Piotr Ożarowski
[Jorge Sebastião Soares, 2014-11-24]
> [1] - http://anonscm.debian.org/cgit/debian-med/iva.git/tree/debian/rules

just a quick look:
* invoking dh_python3 before dh_auto_build doesn't make sense, remove this
  line
* you'd not need "rm -rf build .pybuild" line if you re-enable
  dh_auto_clean
-- 
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/20141124115730.gr4...@sts0.p1otr.com



Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Jorge Sebastião Soares
Hi Piotr,

Thanks for having a look.


On Mon, Nov 24, 2014 at 11:57 AM, Piotr Ożarowski  wrote:

> [Jorge Sebastião Soares, 2014-11-24]
> > [1] -
> http://anonscm.debian.org/cgit/debian-med/iva.git/tree/debian/rules
>
> just a quick look:
> * invoking dh_python3 before dh_auto_build doesn't make sense, remove this
>   line
>

So I just let dh_auto_build cal dh_python3 automatically?


> * you'd not need "rm -rf build .pybuild" line if you re-enable
>   dh_auto_clean
>

So I only override auto_clean to get rid of the man page directory?

Best,

Jorge


Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Piotr Ożarowski
[Jorge Sebastião Soares, 2014-11-24]
> > http://anonscm.debian.org/cgit/debian-med/iva.git/tree/debian/rules
> >
> > just a quick look:
> > * invoking dh_python3 before dh_auto_build doesn't make sense, remove this
> >   line
> >
> 
> So I just let dh_auto_build cal dh_python3 automatically?

dh_auto_build doesn't call it, --with python3 enables it at the right
stage (after dh_auto_install)

> > * you'd not need "rm -rf build .pybuild" line if you re-enable
> >   dh_auto_clean
> >
> 
> So I only override auto_clean to get rid of the man page directory?

yes, if you don't want to disable dh_foo, use something like:

override_dh_foo:
whatever you want to call before dh_foo
dh_foo
whatever you want to call after dh_foo
-- 
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/20141124122602.gs4...@sts0.p1otr.com



Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Jorge Sebastião Soares
Piotr,

On Mon, Nov 24, 2014 at 12:26 PM, Piotr Ożarowski  wrote:

> [Jorge Sebastião Soares, 2014-11-24]
> > > http://anonscm.debian.org/cgit/debian-med/iva.git/tree/debian/rules
> > >
> > > just a quick look:
> > > * invoking dh_python3 before dh_auto_build doesn't make sense, remove
> this
> > >   line
> > >
> >
> > So I just let dh_auto_build cal dh_python3 automatically?
>
> dh_auto_build doesn't call it, --with python3 enables it at the right
> stage (after dh_auto_install)
>

I see.
Thanks for the tip.

>
> > > * you'd not need "rm -rf build .pybuild" line if you re-enable
> > >   dh_auto_clean
> > >
> >
> > So I only override auto_clean to get rid of the man page directory?
>
> yes, if you don't want to disable dh_foo, use something like:
>
> override_dh_foo:
> whatever you want to call before dh_foo
> dh_foo
> whatever you want to call after dh_foo
>

Cool.
I've implemented both things. Pushed it.



> --
> 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/20141124122602.gs4...@sts0.p1otr.com
>
>


Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Jorge Sebastião Soares
Hi guys,

So essentially the package build halts when it tries to run the test suite:

This is the error I'm getting when the pysam module is being imported:

root@debian:~/iva-0.10.0# python3.4 setup.py test
running test
running egg_info
writing top-level names to iva.egg-info/top_level.txt
writing iva.egg-info/PKG-INFO
writing dependency_links to iva.egg-info/dependency_links.txt
reading manifest file 'iva.egg-info/SOURCES.txt'
writing manifest file 'iva.egg-info/SOURCES.txt'
running build_ext
Failure: ImportError (No module named 'pysam') ... ERROR

==
ERROR: Failure: ImportError (No module named 'pysam')
--
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 414, in
loadTestsFromName
addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in
importFromPath
return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in
importFromDir
mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.4/imp.py", line 245, in load_module
return load_package(name, filename)
  File "/usr/lib/python3.4/imp.py", line 217, in load_package
return methods.load()
  File "", line 1220, in load
  File "", line 1200, in _load_unlocked
  File "", line 1129, in _exec
  File "", line 1471, in exec_module
  File "", line 321, in
_call_with_frames_removed
  File "/tmp/buildd/iva-0.10.0/iva/__init__.py", line 20, in 
from iva import *
  File "/tmp/buildd/iva-0.10.0/iva/assembly.py", line 2, in 
import pysam
ImportError: No module named 'pysam'

--
Ran 1 test in 0.016s

FAILED (errors=1)


If pysam is python 3 compliant, I'm tempted to create the needed symlinks
in python3.4 pointing to pysam in python2.7, eg.

ln -s /usr/lib/python2.7/dist-packages/pysam
/usr/lib/python3.4/dist-packages/pysam

I'm sure that this is not the proper way of doing things, so is there any
other way I can get pysam to be installed under python3.4 rather than
python2.7?

Regards,

Jorge


Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Jorge Sebastião Soares
Hi Ghis

On Mon, Nov 24, 2014 at 4:58 PM, Ghislain Vaillant 
wrote:

> At worst, can't you just disable the test suite for the Python 3 builds ?
> Pybuild should allow to do that easily.
>

Trying that now.

But I would still need to link pysam to the iva package at some point, no?

Regards,

Jorge



> 2014-11-24 16:36 GMT+00:00 Jorge Sebastião Soares :
>
>> Hi guys,
>>
>> So essentially the package build halts when it tries to run the test
>> suite:
>>
>> This is the error I'm getting when the pysam module is being imported:
>>
>> root@debian:~/iva-0.10.0# python3.4 setup.py test
>> running test
>> running egg_info
>> writing top-level names to iva.egg-info/top_level.txt
>> writing iva.egg-info/PKG-INFO
>> writing dependency_links to iva.egg-info/dependency_links.txt
>> reading manifest file 'iva.egg-info/SOURCES.txt'
>> writing manifest file 'iva.egg-info/SOURCES.txt'
>> running build_ext
>> Failure: ImportError (No module named 'pysam') ... ERROR
>>
>> ==
>> ERROR: Failure: ImportError (No module named 'pysam')
>> --
>> Traceback (most recent call last):
>>   File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in
>> runTest
>> raise self.exc_val.with_traceback(self.tb)
>>   File "/usr/lib/python3/dist-packages/nose/loader.py", line 414, in
>> loadTestsFromName
>> addr.filename, addr.module)
>>   File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in
>> importFromPath
>> return self.importFromDir(dir_path, fqname)
>>   File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in
>> importFromDir
>> mod = load_module(part_fqname, fh, filename, desc)
>>   File "/usr/lib/python3.4/imp.py", line 245, in load_module
>> return load_package(name, filename)
>>   File "/usr/lib/python3.4/imp.py", line 217, in load_package
>> return methods.load()
>>   File "", line 1220, in load
>>   File "", line 1200, in _load_unlocked
>>   File "", line 1129, in _exec
>>   File "", line 1471, in exec_module
>>   File "", line 321, in
>> _call_with_frames_removed
>>   File "/tmp/buildd/iva-0.10.0/iva/__init__.py", line 20, in 
>> from iva import *
>>   File "/tmp/buildd/iva-0.10.0/iva/assembly.py", line 2, in 
>> import pysam
>> ImportError: No module named 'pysam'
>>
>> --
>> Ran 1 test in 0.016s
>>
>> FAILED (errors=1)
>>
>>
>> If pysam is python 3 compliant, I'm tempted to create the needed symlinks
>> in python3.4 pointing to pysam in python2.7, eg.
>>
>> ln -s /usr/lib/python2.7/dist-packages/pysam
>> /usr/lib/python3.4/dist-packages/pysam
>>
>> I'm sure that this is not the proper way of doing things, so is there any
>> other way I can get pysam to be installed under python3.4 rather than
>> python2.7?
>>
>> Regards,
>>
>> Jorge
>>
>
>


Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Ghislain Vaillant
At worst, can't you just disable the test suite for the Python 3 builds ?
Pybuild should allow to do that easily.

Ghis

2014-11-24 16:36 GMT+00:00 Jorge Sebastião Soares :

> Hi guys,
>
> So essentially the package build halts when it tries to run the test suite:
>
> This is the error I'm getting when the pysam module is being imported:
>
> root@debian:~/iva-0.10.0# python3.4 setup.py test
> running test
> running egg_info
> writing top-level names to iva.egg-info/top_level.txt
> writing iva.egg-info/PKG-INFO
> writing dependency_links to iva.egg-info/dependency_links.txt
> reading manifest file 'iva.egg-info/SOURCES.txt'
> writing manifest file 'iva.egg-info/SOURCES.txt'
> running build_ext
> Failure: ImportError (No module named 'pysam') ... ERROR
>
> ==
> ERROR: Failure: ImportError (No module named 'pysam')
> --
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in
> runTest
> raise self.exc_val.with_traceback(self.tb)
>   File "/usr/lib/python3/dist-packages/nose/loader.py", line 414, in
> loadTestsFromName
> addr.filename, addr.module)
>   File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in
> importFromPath
> return self.importFromDir(dir_path, fqname)
>   File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in
> importFromDir
> mod = load_module(part_fqname, fh, filename, desc)
>   File "/usr/lib/python3.4/imp.py", line 245, in load_module
> return load_package(name, filename)
>   File "/usr/lib/python3.4/imp.py", line 217, in load_package
> return methods.load()
>   File "", line 1220, in load
>   File "", line 1200, in _load_unlocked
>   File "", line 1129, in _exec
>   File "", line 1471, in exec_module
>   File "", line 321, in
> _call_with_frames_removed
>   File "/tmp/buildd/iva-0.10.0/iva/__init__.py", line 20, in 
> from iva import *
>   File "/tmp/buildd/iva-0.10.0/iva/assembly.py", line 2, in 
> import pysam
> ImportError: No module named 'pysam'
>
> --
> Ran 1 test in 0.016s
>
> FAILED (errors=1)
>
>
> If pysam is python 3 compliant, I'm tempted to create the needed symlinks
> in python3.4 pointing to pysam in python2.7, eg.
>
> ln -s /usr/lib/python2.7/dist-packages/pysam
> /usr/lib/python3.4/dist-packages/pysam
>
> I'm sure that this is not the proper way of doing things, so is there any
> other way I can get pysam to be installed under python3.4 rather than
> python2.7?
>
> Regards,
>
> Jorge
>


Re: Fwd: [iva] - Python 3 code depends on pysam

2014-11-24 Thread Jorge Sebastião Soares
Hi Ghis,

Disabling the tests worked.

The package builds at least, but not lintian clean
.

I'll cary on tomorrow.

Regards,

Jorge

On Mon, Nov 24, 2014 at 5:02 PM, Jorge Sebastião Soares <
j.s.soa...@gmail.com> wrote:

> Hi Ghis
>
> On Mon, Nov 24, 2014 at 4:58 PM, Ghislain Vaillant 
> wrote:
>
>> At worst, can't you just disable the test suite for the Python 3 builds ?
>> Pybuild should allow to do that easily.
>>
>
> Trying that now.
>
> But I would still need to link pysam to the iva package at some point, no?
>
> Regards,
>
> Jorge
>
>
>
>> 2014-11-24 16:36 GMT+00:00 Jorge Sebastião Soares :
>>
>>> Hi guys,
>>>
>>> So essentially the package build halts when it tries to run the test
>>> suite:
>>>
>>> This is the error I'm getting when the pysam module is being imported:
>>>
>>> root@debian:~/iva-0.10.0# python3.4 setup.py test
>>> running test
>>> running egg_info
>>> writing top-level names to iva.egg-info/top_level.txt
>>> writing iva.egg-info/PKG-INFO
>>> writing dependency_links to iva.egg-info/dependency_links.txt
>>> reading manifest file 'iva.egg-info/SOURCES.txt'
>>> writing manifest file 'iva.egg-info/SOURCES.txt'
>>> running build_ext
>>> Failure: ImportError (No module named 'pysam') ... ERROR
>>>
>>> ==
>>> ERROR: Failure: ImportError (No module named 'pysam')
>>> --
>>> Traceback (most recent call last):
>>>   File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in
>>> runTest
>>> raise self.exc_val.with_traceback(self.tb)
>>>   File "/usr/lib/python3/dist-packages/nose/loader.py", line 414, in
>>> loadTestsFromName
>>> addr.filename, addr.module)
>>>   File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in
>>> importFromPath
>>> return self.importFromDir(dir_path, fqname)
>>>   File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in
>>> importFromDir
>>> mod = load_module(part_fqname, fh, filename, desc)
>>>   File "/usr/lib/python3.4/imp.py", line 245, in load_module
>>> return load_package(name, filename)
>>>   File "/usr/lib/python3.4/imp.py", line 217, in load_package
>>> return methods.load()
>>>   File "", line 1220, in load
>>>   File "", line 1200, in _load_unlocked
>>>   File "", line 1129, in _exec
>>>   File "", line 1471, in exec_module
>>>   File "", line 321, in
>>> _call_with_frames_removed
>>>   File "/tmp/buildd/iva-0.10.0/iva/__init__.py", line 20, in 
>>> from iva import *
>>>   File "/tmp/buildd/iva-0.10.0/iva/assembly.py", line 2, in 
>>> import pysam
>>> ImportError: No module named 'pysam'
>>>
>>> --
>>> Ran 1 test in 0.016s
>>>
>>> FAILED (errors=1)
>>>
>>>
>>> If pysam is python 3 compliant, I'm tempted to create the needed
>>> symlinks in python3.4 pointing to pysam in python2.7, eg.
>>>
>>> ln -s /usr/lib/python2.7/dist-packages/pysam
>>> /usr/lib/python3.4/dist-packages/pysam
>>>
>>> I'm sure that this is not the proper way of doing things, so is there
>>> any other way I can get pysam to be installed under python3.4 rather than
>>> python2.7?
>>>
>>> Regards,
>>>
>>> Jorge
>>>
>>
>>
>