[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ruamel.yaml backport




Hans-Christoph Steiner:
> 
> 
> Andreas Tille:
>> Hi Hans-Christoph,
>>
>> [keeping debian-backports list in the row]
>>
>> On Tue, May 16, 2017 at 09:05:17PM +0200, Hans-Christoph Steiner wrote:
>>>
>>> Thanks for the ruamel.yaml backport!  We're using it for F-Droid.
>>> Michael just found an issue with it: ruamel.yaml depends on
>>> python-typing.  Its built into Python 3.5+, and there is python-typing
>>> for python 2.x.  But jessie's python3 is 3.4.x, so ruamel.yaml is
>>> missing a 'typing' library.  It seems that the source package already
>>> includes the sources for the python3.4 module, it just needs to build
>>> it.  I tried my hand, but it was failing on the tests.  I'm totally
>>> unfamiliar with the pytest framework.
>>>
>>> Has your backport been working for you?
>>
>> Well, I was building it as a reverse dependency for the Debian Med
>> package cwltool.  I can confirm that build time tests worked as well as
>> for ruamel.yaml as also for cwltool.  That's all I can say and I need to
>> admit that I'm not really familiar with pytest framework.  It would help
>> if you would more verbose what exactly happened at your build / test
>> attempt and may be asking on debian-python list for help.
>>
>> Kind regards
>>
>>         Andreas.
>>
> 
> Hey Andreas,
> 
> Sounds like cwltool is only using python2.  This issue only happens on
> python3.
> 
> Here's the error in question:
> 
> __________________________________________________ ERROR collecting
> src/test_typing.py __________________________________________________
> import file mismatch:
> imported module 'test_typing' has this __file__ attribute:
>   /export/share/code/collab-maint/python-typing/python2/test_typing.py
> which is not the same as the test file we want to collect:
>   /export/share/code/collab-maint/python-typing/src/test_typing.py
> HINT: remove __pycache__ / .pyc files and/or use a unique basename for
> your test file modules
> ================================================== 136 passed, 1 error
> in 0.17 seconds ==================================================

Ok, I figured it out, I needed to do this in debian/rules:

override_dh_auto_test:
        python2 -m pytest python2/
        python3 -m pytest src/

So I'll work with the maintainer to get this into sid, then work on the
backport.

.hc


Reply to: