thegooglecodearchive / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

mpmath does not build in current Fedoras #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm trying to update the Fedora package of mpmath (python-mpmath) to version 
0.17, however it does not compile with Python 2.7 (which is e.g. in Fedora 14).

The error I get is the following:

+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below 
/builddir/build/BUILDROOT/python-mpmath-0.17-1.fc14.x86_64/usr/lib/python2.7/ 
using /usr/bin/python2.7
Compiling 
/builddir/build/BUILDROOT/python-mpmath-0.17-1.fc14.x86_64/usr/lib/python2.7/sit
e-packages/mpmath/libmp/exec_py3.py ...
SyntaxError: ('invalid syntax', 
('/usr/lib/python2.7/site-packages/mpmath/libmp/exec_py3.py', 1, 12, 'exec_ = 
exec\n'))
Compiling 
/builddir/build/BUILDROOT/python-mpmath-0.17-1.fc14.x86_64/usr/lib/python2.7/sit
e-packages/mpmath/tests/extratest_gamma.py ...
SyntaxError: ('invalid syntax', 
('/usr/lib/python2.7/site-packages/mpmath/tests/extratest_gamma.py', 50, 35, '  
      print("%s ok;" % name, end=\' \')\n'))
Compiling 
/builddir/build/BUILDROOT/python-mpmath-0.17-1.fc14.x86_64/usr/lib/python2.7/sit
e-packages/mpmath/tests/torture.py ...
SyntaxError: ('invalid syntax', 
('/usr/lib/python2.7/site-packages/mpmath/tests/torture.py', 80, 27, '          
  print(".", end=\' \')\n'))
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.2yIKIP (%install)
    Bad exit status from /var/tmp/rpm-tmp.2yIKIP (%install)
Child returncode was: 1

Original issue reported on code.google.com by jussi.le...@gmail.com on 6 Feb 2011 at 9:58

GoogleCodeExporter commented 9 years ago
The above was on Fedora 14, the same problem also occurs on Fedora 13 and 
Fedora 15 (the development version).

Original comment by jussi.le...@gmail.com on 6 Feb 2011 at 10:20

GoogleCodeExporter commented 9 years ago
Thanks. It is evident that I forgot to test run torture.py.

I fixed this in r1230.

Original comment by fredrik....@gmail.com on 6 Feb 2011 at 11:37

GoogleCodeExporter commented 9 years ago
Are you going to make a new release?

Original comment by jussi.le...@gmail.com on 6 Feb 2011 at 11:40

GoogleCodeExporter commented 9 years ago
... and you still need to fix exec_py3.py.

Original comment by jussi.le...@gmail.com on 6 Feb 2011 at 11:48

GoogleCodeExporter commented 9 years ago
Probably not yet, at least not until further reports are in.

This is a bit disappointing, but I can't think of a way to fix it universally 
short of creating separate Python 2 and Python 3 packages.

Any chance you can modify the RPM install script to skip byte-compiling 
exec_py2.py/exec_py3.py (depending on version)?

Original comment by fredrik....@gmail.com on 6 Feb 2011 at 12:00

GoogleCodeExporter commented 9 years ago
I got it to build by getting rid of exec_py3.py after the install. It isn't 
necessary, right?

I'm not going to support python3 in my packages until it becomes the default.

Original comment by jussi.le...@gmail.com on 6 Feb 2011 at 1:18

GoogleCodeExporter commented 9 years ago
Right, the exec_py3.py file is never used when run from Python 2.

If you don't need to support Python 2 and Python 3 with the same package, then 
this solution should be fine.

Original comment by fredrik....@gmail.com on 6 Feb 2011 at 1:39