Skip to content

Commit

Permalink
distutils patch to link against bundled libs
Browse files Browse the repository at this point in the history
  • Loading branch information
squeaky-pl committed Apr 16, 2015
1 parent 5bb4c30 commit 1a27751
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions make_portable
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ if __name__ == '__main__':
copytree('/opt/prefix/lib/tk8.6', 'lib/tk')
check_call(['patch', 'lib_pypy/_tkinter/app.py', '/src/_tkinter_app.py.patch'])
check_call(['patch', 'lib-python/2.7/subprocess.py', '/src/subprocess.py.patch'])
check_call(['patch', 'lib-python/2.7/distutils/sysconfig_pypy.py', '/src/sysconfig_pypy.py.patch'])
1 change: 1 addition & 0 deletions runopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ cat <<EOF
-v `pwd`/platform_linux.patch:/src/platform_linux.patch
-v `pwd`/_tkinter_app.py.patch:/src/_tkinter_app.py.patch
-v `pwd`/subprocess.py.patch:/src/subprocess.py.patch
-v `pwd`/sysconfig_pypy.py.patch:/src/sysconfig_pypy.py.patch
-v `pwd`/virtualenv-pypy:/src/virtualenv-pypy
-v `pwd`/prefix$ABI:/opt/prefix
Expand Down
11 changes: 11 additions & 0 deletions sysconfig_pypy.py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- lib-python/2.7/distutils/sysconfig_pypy.orig.py 2015-04-16 10:15:56.121894168 +0200
+++ lib-python/2.7/distutils/sysconfig_pypy.py 2015-04-16 10:16:18.761547389 +0200
@@ -124,6 +124,8 @@
"""
if compiler.compiler_type == "unix":
compiler.compiler_so.extend(['-O2', '-fPIC', '-Wimplicit'])
+ libdir = os.path.join(sys.prefix, 'lib')
+ compiler.linker_so.extend(['-L' + libdir, '-Wl,-rpath,' + libdir])
compiler.shared_lib_extension = get_config_var('SO')
if "CPPFLAGS" in os.environ:
cppflags = shlex.split(os.environ["CPPFLAGS"])

0 comments on commit 1a27751

Please sign in to comment.