Last active
April 12, 2017 16:22
-
-
Save dnozay/5801689 to your computer and use it in GitHub Desktop.
installing pypy on 64bit centos 6.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/lib64/pypy-1.9/lib-python/2.7/distutils/unixccompiler.py 2012-06-15 11:33:20.000000000 -0700 | |
+++ /tmp/unixccompiler.py 2013-06-17 12:39:10.212783192 -0700 | |
@@ -297,7 +297,9 @@ | |
# this time, there's no way to determine this information from | |
# the configuration data stored in the Python installation, so | |
# we use this hack. | |
- compiler = os.path.basename(sysconfig.get_config_var("CC")) | |
+ # XXX: http://bugs.python.org/issue14030 | |
+ # compiler = os.path.basename(sysconfig.get_config_var("CC")) | |
+ compiler = os.path.basename(self.compiler[0]) | |
if sys.platform[:6] == "darwin": | |
# MacOSX's linker doesn't understand the -R flag at all | |
return "-L" + dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
yum install pypy pypy-devel pypy-libs | |
# create a pypy environment | |
# this may fail miserably on CentOS 6.4 x86_64 with the stack trace: | |
# | |
# $ virtualenv -p /usr/bin/pypy /tmp/pypyenv | |
# Running virtualenv with interpreter /usr/bin/pypy | |
# Traceback (most recent call last): | |
# File "app_main.py", line 51, in run_toplevel | |
# File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 2577, in <module> | |
# main() | |
# File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 979, in main | |
# no_pip=options.no_pip) | |
# File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 1081, in create_environment | |
# site_packages=site_packages, clear=clear)) | |
# File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 1256, in install_python | |
# fix_lib64(lib_dir) | |
# File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 1643, in fix_lib64 | |
# "Unexpected python lib dir: %r" % lib_dir) | |
# AssertionError: Unexpected python lib dir: '/tmp/pypyenv' | |
# install a copy of virtualenv that's known to work with pypy. | |
virtualenv virtualenv_bootstrap | |
source virtualenv_bootstrap/bin/activate | |
pip install git+git://github.com/pypa/virtualenv.git | |
# create a pypy environment | |
virtualenv -p $(which pypy) --no-site-packages pypyenv | |
# switch to pypyenv | |
deactivate | |
source pypyenv/bin/activate | |
# work around issue http://bugs.python.org/issue14030 | |
# wget distutils.patch from this gist | |
sudo patch -p0 < distutils.patch | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment