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

Fix site-packages for ArchLinux installations

parent ed6b7981
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ from setuptools import setup, find_packages
setup(
name='xbob.buildout',
version='0.2.12',
version='0.2.13',
description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages",
keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'],
url='http://github.com/bioidiap/xbob.buildout',
......
......@@ -18,6 +18,15 @@ from zc.buildout.buildout import bool_option
import zc.buildout.easy_install
from zc.recipe.egg import Scripts
# 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'),
])
# Python interpreter script template
py_script_template = """#!%(interpreter)s
# %(date)s
......@@ -77,9 +86,10 @@ class Recipe(Scripts):
self.user_paths = []
if prefixes:
for k in prefixes:
candidate = os.path.realpath(get_python_lib(prefix=k))
if os.path.exists(candidate) and candidate not in self.user_paths:
self.user_paths.append(candidate)
for suffix in SUFFIXES:
candidate = os.path.realpath(os.path.join(k, suffix))
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?
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