andyvand / gmpy

Automatically exported from code.google.com/p/gmpy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

setup.py fails even if correct versions are present #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As reported via comment on wiki:

I've got a perfectly standard Ubuntu system with the latest versions of gmp, 
mpfr, and mpc in the usual places (/usr, /usr/local, and I am using them ok 
with other projects), but none of the above worked.   I got setup.py to print 
the version numbers found and they are ok (#! below).   If I remove the "raise 
SystemExit" at line 141 of setup.py, it still builds correctly.   So something 
is wrong with the logic of detecting the versions.

~/Downloads/gmpy2-2.0.0> sudo python setup.py install
[sudo] password for kbriggs:
running install
running build
running build_ext
#! mpfr version detected=(3, 1, 2)
#! mpc  version detected=(1, 0, 1)

The required versions of GMP/MPIR, MPFR, or MPC could not be
found. gmpy2 requires MPFR version 3.1.0 or greater and MPC
version 1.0.0 or greater. To specify a directory prefix that
contains the proper versions, use the --prefix=<dir> option.
running install_lib
copying build/lib.linux-x86_64-2.7/gmpy2.so -> 
/usr/local/lib/python2.7/dist-packages
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/gmpy2-2.0.0.egg-info

Original issue reported on code.google.com by casevh on 2 Apr 2013 at 12:48

GoogleCodeExporter commented 9 years ago
I think I know the issue: I always compile GMP, MPFR, and MPC together so they 
are always found under the same directory. I assume you have GMP in /usr and 
MPFR/MPC in /usr/local.

I'll work on a setup.py with better logic for detecting versions.

Original comment by casevh on 2 Apr 2013 at 12:52

GoogleCodeExporter commented 9 years ago
That's correct.  GMP is in /usr because it is a standard Ubuntu package; the 
others are not, so they go in /usr/local.

Original comment by keith.br...@bt.com on 2 Apr 2013 at 2:44

GoogleCodeExporter commented 9 years ago
I reworked the logic for detecting versions of MPFR and MPC. Now if setup.py 
can't detect the proper versions, it just prints a warning and still tries to 
compile. Can you try the attached setup.py?

Original comment by casevh on 3 Apr 2013 at 4:18

Attachments:

GoogleCodeExporter commented 9 years ago
I have release GMPY2 2.0.1 which includes an updated setup.py.

Original comment by casevh on 28 Jul 2013 at 5:01