ratt-ru / pyxis

Python Extensions for Interferometry Scripting
3 stars 5 forks source link

syntax error during install from KERN-6 #102

Closed o-smirnov closed 4 years ago

o-smirnov commented 4 years ago

Looks like a py3 port breakage.

Setting up python-pyxis (1.7.0-1kern1) ...
  File "/usr/lib/python2.7/dist-packages/Pyxides/gce.py", line 101
    key=cmp_to_key(lambda a, b:-cmp(_version_suffix(a),_version_suffix(b)));
                                                                           ^
SyntaxError: invalid syntax

dpkg: error processing package python-pyxis (--configure):
 installed python-pyxis package post-installation script subprocess returned error exit status 101
E: Sub-process /usr/bin/dpkg returned an error code (1)
o-smirnov commented 4 years ago

@Athanaseus @gijzelaerr help I don't get it. It's clunky horrible old code, but I don't see the syntax error.

What's more, I can pip install -e pyxis this into both a py2 and a py3 virtualenv, and neither of them throws a syntax error on this module. So what's different about the deb package?

gijzelaerr commented 4 years ago

deb pre compiles the python files into pyc, that fails. not sure why that happens for a py2 package though. maybe it is actually py3 code not compatible with py2 env

o-smirnov commented 4 years ago

But I can run this in py2 or py3 when I do it locally... so what's different about how deb runs it?

o-smirnov commented 4 years ago

And what's wrong with the code anyway. Seems legit to me. Unless it's not picking up that this is a continuation line somehow?

Athanaseus commented 4 years ago

Ah this was fixed by #94 after the release. Can make a patch for this or wait for the next release?

o-smirnov commented 4 years ago

Let's merge #104, and give @matthieutrs another couple of days, as he seems to have a knack for turning up bugs. Then we make a patch.

o-smirnov commented 4 years ago

OK, @matthieutrs reports success -- I've made a 1.7.1 release, let's push that into KERN.

Athanaseus commented 4 years ago

Now on KERN.

o-smirnov commented 4 years ago

Excellent, thanks!