简体   繁体   中英

PyPy translate 64bit

I can't seem to find the answer to this question anywhere. I'd just like to know, does the PyPy translate.py script produce 64bit or 32bit binary files? Is there an option to choose between the two that I'm missing or can PyPy only produce 32bit binaries?

RPython currently produces binaries according to the “host-Pyhton”, that is, typically a 32 bit binary on a 32 bit system and a 64 bit binary on a 64 bit system

However, to work cross-bit you can do the following:

On Linux

If you have a 64 bit system

  • just translate to get a 64 bit binary or
  • you can try to translate within a 32 bit chroot environment [ 1 , 2 , 3 , 4 ] to produce a 32 bit one.

If you have a 32 bit system

  • you can only produce 32 bit binaries.

On OS X

On OS X > 10.7, you typically have a 64 bit system so

  • just translate to get a 64 bit binary or
  • use the environment variable VERSIONER_PYTHON_PREFER_32_BIT to control the “bitness” of python. For a 32 bit binary, you can run

     PYTHONPATH=$PYPYPATH:… VERSIONER_PYTHON_PREFER_32_BIT=yes python $PYPYPATH/rpython/bin/rpython target….py 

    Note that you have to use python in this case (typically, rpython detects an installed pypy and uses that), because pypy does not respect the versioner variable and does not come as a 32 bit binary for OS X in the first place.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM