[issue26743] Unable to import random with python2.7 on power pc based machine
STINNER Victor
report at bugs.python.org
Thu Apr 14 18:26:41 EDT 2016
STINNER Victor added the comment:
I guess that Serhiy is looking for these variables defined in pyconfig.h:
---
/* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
mixed-endian order (byte order 45670123) */
#undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754
/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the most
significant byte first */
#undef DOUBLE_IS_BIG_ENDIAN_IEEE754
/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
least significant byte first */
#undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
---
On Fedora, pyconfig.h is installed into /usr/include/python2.7/pyconfig.h. This file doesn't contain any sensitive information, it is the configuration used to build Python.
On Fedora, this file only dispatches between pyconfig-32.h and pyconfig-64.h:
---
$ cat /usr/include/python2.7/pyconfig.h
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "pyconfig-32.h"
#elif __WORDSIZE == 64
#include "pyconfig-64.h"
#else
#error "Unknown word size"
#endif
---
My system is 64-bit, so I can use pyconfig-64.h:
---
$ grep IEEE /usr/include/python2.7/pyconfig-64.h
/* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
/* #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 */
/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the most
/* #undef DOUBLE_IS_BIG_ENDIAN_IEEE754 */
/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
/* #undef HAVE_IEEEFP_H */
/* #undef HAVE_LIBIEEE */
/* Define to activate features from IEEE Stds 1003.1-2001 */
---
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26743>
_______________________________________
More information about the Python-bugs-list
mailing list