Skip to content
Snippets Groups Projects
Commit ed6b7981 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Allow detection in systems where libraries are installed in lib64 or lib32 instead of 'lib'

parent c4e47956
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ from setuptools import setup, find_packages ...@@ -7,7 +7,7 @@ from setuptools import setup, find_packages
setup( setup(
name='xbob.buildout', name='xbob.buildout',
version='0.2.11', version='0.2.12',
description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages", description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages",
keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'], keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'],
url='http://github.com/bioidiap/xbob.buildout', url='http://github.com/bioidiap/xbob.buildout',
......
...@@ -22,6 +22,8 @@ class EnvironmentWrapper(object): ...@@ -22,6 +22,8 @@ class EnvironmentWrapper(object):
# set the pkg-config paths to look at # set the pkg-config paths to look at
pkgcfg = [os.path.join(k, 'lib', 'pkgconfig') for k in prefixes] pkgcfg = [os.path.join(k, 'lib', 'pkgconfig') for k in prefixes]
pkgcfg += [os.path.join(k, 'lib64', 'pkgconfig') for k in prefixes]
pkgcfg += [os.path.join(k, 'lib32', 'pkgconfig') for k in prefixes]
self.pkgcfg = [os.path.abspath(k) for k in pkgcfg if os.path.exists(k)] self.pkgcfg = [os.path.abspath(k) for k in pkgcfg if os.path.exists(k)]
def set(self): def set(self):
......
...@@ -20,6 +20,15 @@ from zc.recipe.egg import Scripts ...@@ -20,6 +20,15 @@ from zc.recipe.egg import Scripts
from distutils.sysconfig import get_python_lib from distutils.sysconfig import get_python_lib
# Standard prefixes to check
PYTHONDIR = 'python%d.%d' % sys.version_info[0:2]
SUFFIXES = tools.uniq([
get_python_lib(prefix=''),
os.path.join('lib', PYTHONDIR, 'site-packages'),
os.path.join('lib32', PYTHONDIR, 'site-packages'),
os.path.join('lib64', PYTHONDIR, 'site-packages'),
])
# Fixes python script template # Fixes python script template
zc.buildout.easy_install.py_script_template = \ zc.buildout.easy_install.py_script_template = \
zc.buildout.easy_install.py_script_template.replace( zc.buildout.easy_install.py_script_template.replace(
...@@ -75,9 +84,10 @@ class Recipe(Scripts): ...@@ -75,9 +84,10 @@ class Recipe(Scripts):
self.user_paths = [] self.user_paths = []
if prefixes: if prefixes:
for k in prefixes: for k in prefixes:
candidate = os.path.realpath(get_python_lib(prefix=k)) for suffix in SUFFIXES:
if os.path.exists(candidate) and candidate not in self.user_paths: candidate = os.path.realpath(os.path.join(k, suffix))
self.user_paths.append(candidate) if os.path.exists(candidate) and candidate not in self.user_paths:
self.user_paths.append(candidate)
# Shall we panic or ignore if we cannot find all eggs? # Shall we panic or ignore if we cannot find all eggs?
self.panic = options.get('error-on-failure', 'true').lower() == 'true' self.panic = options.get('error-on-failure', 'true').lower() == 'true'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment