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

Re: [MoM] lefse migration to python 3



Hello Andreas,

Just an update. Apologies for the somewhat degraded and slower performance.

Please check the patch as mentioned for just an instance to make sure I
am on a satisfactory path before I push for a changelog. As stated, one
file needed to have a consistent tab / space correction due to failing
apt install which resulted in a slightly bigger patch than preferred.
I'd hate to finalise on something that isn't good :).

On top of this, regarding FAST, upstream has been really silent (not
usually like this). I could give them a week or so, but what is the
worst case with regards to this package? It seems like the test suite is
troublesome (more than probably a machine trouble / misconfiguration or
FAST nitpicking a specific opencl platform) and if there is no response
from upstream, I won't be able look into the test suite. Does that mean
theoretically abandoning this package for some amount of time either
until the test suite can be checked by another peer with the correct
hardware & opencl knowledge?

On the side, I have decided to work on another package. It seems like
even this is getting to be a slight pain (depends on gatb-core and
modifying cmake to use debian packaged gatb-core seems to bring a whole
lot of issues during linkage). I am currently waiting until upstream
replies or someone via the mentors mailing list to give a suggestion.

Thanks for the support once again & kind regards,
Shayan Doust

On 06/09/2019 21:19, Shayan Doust wrote:
> Hello Andreas,
> 
> I completely forgot that running autopep8 on all the python files would
> be a bad idea and result in a bigger patch than necessary. I only ran it
> on lefsebion/AbundanceTable.py this time (now an even smaller patch with
> mainly singular line changes) because installing *.deb would fail as
> inconsistent tabs and spaces used in AbundanceTable.py.
> 
> Have you had this happen?
> 
> Kind regards,
> Shayan Doust
> 
> On 06/09/2019 20:41, Shayan Doust wrote:
>> Hello Andreas,
>>
>>> Your 2to3 patch looks pretty long.  What I'm doing for the conversion
>>> is the following:
>>>
>>>    find . -name "*.py" -exec 2to3 -w \{\} \;
>>>    find . -name "*.py" -exec sed -i '1s:#!/usr/bin/env
>> python:#!/usr/bin/python3:' \{\} \;
>>>    git diff > debian/patches/2to3.patch
>>>    git stash
>>>    find . -name "*.bak" -delete
>>>
>>> This leads to a way shorter patch than yours mostly single lines
>>> and not replacements of whole functions.  How did you created your
>>> patch?
>>
>> Oh I see. I did:
>>
>> 2to3 --nobackups --write *.py recursively in the main working directory
>> and lefsebiom folder
>> autopep8 -i *.py to ensure pep8 compliancy
>> git diff > debian/patches/2to3.patch
>> git stash
>>
>> and allowed dh_python3 to replace the shebang instead of using sed.
>>
>> I assumed single line replacements not to be possible with the method I
>> was doing and whole block diff changes the only way. I see what you've
>> done now.
>>
>>> BTW, I also add DEP3 headers with the fields
>>>     Description
>>>     Author
>>>     Last-Updated
>>>     Bug-Debian
>>
>> Thanks. I was leaving that at the end just so I wasn't sure if the patch
>> needed redoing.
>>
>> Kind regards,
>> Shayan Doust
>>
>> On 06/09/2019 20:33, Andreas Tille wrote:
>>> Hi Shayan,
>>>
>>> On Fri, Sep 06, 2019 at 04:57:30PM +0100, Shayan Doust wrote:
>>>> I think I have done everything to make this package work with python 3
>>>> and deprecate usage of python 2. First time touching python so I would
>>>> rather have someone quickly check this before I append a changelog and
>>>
>>> Your 2to3 patch looks pretty long.  What I'm doing for the conversion
>>> is the following:
>>>
>>>    find . -name "*.py" -exec 2to3 -w \{\} \;
>>>    find . -name "*.py" -exec sed -i '1s:#!/usr/bin/env python:#!/usr/bin/python3:' \{\} \; 
>>>    git diff > debian/patches/2to3.patch
>>>    git stash
>>>    find . -name "*.bak" -delete
>>>
>>> This leads to a way shorter patch than yours mostly single lines
>>> and not replacements of whole functions.  How did you created your
>>> patch?
>>>
>>> BTW, I also add DEP3 headers with the fields
>>>     Description
>>>     Author
>>>     Last-Updated
>>>     Bug-Debian
>>>
>>> Kind regards
>>>
>>>       Andreas.
>>>
>>
> 

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: