Commit db32c2db authored by Reinout van Rees's avatar Reinout van Rees

Merge pull request #229 from buildout/225-dont_prefix_special_rpath_vars

Avoid prefixing buildout dir to 'special' rpath elements.
parents 4cf5773f a6385a61
...@@ -22,6 +22,13 @@ Unreleased ...@@ -22,6 +22,13 @@ Unreleased
https://github.com/buildout/buildout/pull/222 . https://github.com/buildout/buildout/pull/222 .
[lrowe] [lrowe]
- Note: zc.recipe.egg has also been updated to 2.0.2 together with this
zc.buildout release. Fixed: In ``zc.recipe.egg#custom`` recipe's ``rpath``
support, don't assume path elements are buildout-relative if they start with
one of the "special" tokens (e.g., ``$ORIGIN``). See:
https://github.com/buildout/buildout/issues/225.
[tseaver]
- Bootstrap script now accepts ``--to-dir``. Setuptools is installed there. If - Bootstrap script now accepts ``--to-dir``. Setuptools is installed there. If
already available there, it is reused. This can be used to bootstrap already available there, it is reused. This can be used to bootstrap
buildout without internet access. Similarly, a local ``ez_setup.py`` is used buildout without internet access. Similarly, a local ``ez_setup.py`` is used
......
Change History Change History
************** **************
2.0.2 (unreleased)
==================
- Fixed: In ``zc.recipe.egg#custom`` recipe's ``rpath`` support, don't
assume path elements are buildout-relative if they start with one of the
"special" tokens (e.g., ``$ORIGIN``). See:
https://github.com/buildout/buildout/issues/225.
[tseaver]
2.0.1 (2013-09-05) 2.0.1 (2013-09-05)
================== ==================
...@@ -129,7 +138,7 @@ Feature Changes ...@@ -129,7 +138,7 @@ Feature Changes
- Cause develop eggs to be created after other parts. - Cause develop eggs to be created after other parts.
- The develop and build recipes now return the paths created, so that - The develop and build recipes now return the paths created, so that
created eggs or egg links are removed when a part is removed (or created eggs or egg links are removed when a part is removed (or
changed). changed).
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"""Setup for zc.recipe.egg package """Setup for zc.recipe.egg package
""" """
version = '2.0.1' version = '2.0.2.dev0'
import os import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
......
...@@ -130,7 +130,7 @@ class Develop(Base): ...@@ -130,7 +130,7 @@ class Develop(Base):
def build_ext(buildout, options): def build_ext(buildout, options):
result = {} result = {}
for be_option in ('include-dirs', 'library-dirs', 'rpath'): for be_option in ('include-dirs', 'library-dirs'):
value = options.get(be_option) value = options.get(be_option)
if value is None: if value is None:
continue continue
...@@ -145,6 +145,25 @@ def build_ext(buildout, options): ...@@ -145,6 +145,25 @@ def build_ext(buildout, options):
result[be_option] = os.pathsep.join(value) result[be_option] = os.pathsep.join(value)
options[be_option] = os.pathsep.join(value) options[be_option] = os.pathsep.join(value)
# rpath has special symbolic dirnames which must not be prefixed
# with the buildout dir. See:
# http://man7.org/linux/man-pages/man8/ld.so.8.html
RPATH_SPECIAL = [
'$ORIGIN', '$LIB', '$PLATFORM', '${ORIGIN}', '${LIB}', '${PLATFORM}']
def _prefix_non_special(x):
x = x.strip()
for special in RPATH_SPECIAL:
if x.startswith(special):
return x
return os.path.join( buildout['buildout']['directory'], x)
value = options.get('rpath')
if value is not None:
values = [_prefix_non_special(v)
for v in value.strip().split('\n') if v.strip()]
result['rpath'] = os.pathsep.join(values)
options['rpath'] = os.pathsep.join(values)
swig = options.get('swig') swig = options.get('swig')
if swig: if swig:
options['swig'] = result['swig'] = os.path.join( options['swig'] = result['swig'] = os.path.join(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment